ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

rospy logging configuration

asked 2011-06-15 04:06:42 -0500

bhaskara gravatar image

updated 2014-01-28 17:09:51 -0500

ngrennan gravatar image

The rospy docs mention that from Diamondback on, rospy uses Python's logging library and configuration format. Two questions about this: - The link in the docs is broken. Is there an example on the wiki about how to use this? - How do the Python handlers interact with the publication of log messages on /rosout?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-06-15 04:33:35 -0500

kwc gravatar image

The python logging documentation is here:

http://docs.python.org/lib/module-logging.html

Admittedly, it is pretty difficult documentation to wade through and is part of the reason why I want to move away from the logging module.

The logging configuration file does not interact with log messages on /rosout. The /rosout log level can be overridden in the rospy.init_node call.

edit flag offensive delete link more

Comments

2
Right, in particular, the linking text says "this is how your configuration file should look", but the documentation doesn't actually describe the config file format. Python's logging looks pretty flexible actually, and I think it would be a good solution if 1) there was an example ros-specific configuration file in the wiki docs; 2) there was a unified way of controlling what's printed on the console/what's sent to rosout (i.e., by adding a subclass of logging.Handler). Overriding things in rospy.init_node is not fine-grained, and it also means the user has to edit a (often version controlled or read-only) source file rather than changing a local config file (or eventually, maybe using a tool such as rxloggerlevel). My 2c :)
bhaskara gravatar image bhaskara  ( 2011-06-20 06:58:26 -0500 )edit

Question Tools

Stats

Asked: 2011-06-15 04:06:42 -0500

Seen: 1,257 times

Last updated: Jun 15 '11