Replies: 7 comments 7 replies
-
Here's a PR to add loglevel info to our docs: viamrobotics/docs#2377 As for a modules that use pubsub for logs, definitely an interesting idea, I wonder if we should have a conversation in more detail around how you're using pubsub overall and if there might be another pattern that would work and is more Viam-native. |
Beta Was this translation helpful? Give feedback.
-
OK, so I think our current eng effort will cover this! |
Beta Was this translation helpful? Give feedback.
-
@mcvella I have tried adding logging to a few different places that are referenced by a process, and finally added it directly to the process but I'm not seeing any debug output. I know the process is being executed because the robot starts 'behaving', but nothing comes through on the logs. I do get logs from a simple module I created which is running in parallel, but that output is the I feel like this means I haven't configured the process correctly. Can you spot anything out of place? UPDATE: Aside from the debug logging, if I cause the process to fail deliberately, it will show the below error but not provide any additional context: But running the script directly via SSH will show the error message and traceback. So it looks like the viam server is suppressing some error logging, which is the opposite of what I want 😅 These are the first challenges around the debugging issues we discussed, once I have logging working I will hopefully find the rest of the integration goes more quickly. |
Beta Was this translation helpful? Give feedback.
-
Sounds like maybe the process is exiting before it even logs; can you show me your process config? |
Beta Was this translation helpful? Give feedback.
-
In that case let me create a smaller process with just the basics and try that first. I'll get back to you.
…________________________________
From: Matt Vella ***@***.***>
Sent: Tuesday, January 16, 2024 8:52:23 PM
To: makerforgetech/modular-biped ***@***.***>
Cc: Dan Nicholson ***@***.***>; Author ***@***.***>
Subject: Re: [makerforgetech/modular-biped] Viam - Logging in Python? (Discussion #74)
Sounds like maybe the process is exiting before it even logs; can you show me your process config?
—
Reply to this email directly, view it on GitHub<#74 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABSHFZGTFV4CIYP5PKPJBXLYO3SAPAVCNFSM6AAAAABBTREFHCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DCNBZGE2TA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Ok @mcvella I've created a simple test process and I can see logging there so I'll break down the main script and see where it might be failing. I'll update in a day or so after i've taken a look in more detail. Thanks for your help! |
Beta Was this translation helpful? Give feedback.
-
In the modular biped project we have a logging tool that uses pubsub to subscribe to various log requests.
The tool utilises the python
logging
module, but it would be good to have the option to interface with the viam logging tool instead.I see an example to configure logging, but in the python there is no example to output:
What is the python equivalent of
c.logger.Infof("performing some function with a=%v",a)
and similar, shown in the go example.Then following that, would it make sense me creating a module to log from pubsub, based on the example I have already? Is there something on the roadmap around improved logging that would supersede this?
Very broadly I'd like to enable:
Beta Was this translation helpful? Give feedback.
All reactions