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

Revision history [back]

click to hide/show revision 1
initial version

Hi Andrzej,

so rosconsole is purley a C++ logging related package. rospy's logging seems to be somewhat unrelated. In particular the logging with rospy tutorial makes no mention of such a configuration of the output.

The only mention of ROSCONSOLE_FORMAT in https://github.com/ros/ros_comm is in C++ code and the code that seems to implent the output formatting in rospy is also pretty clearly not configurable in such a way.

It's probably pretty straight forward to implement support for that environment variable also for rospy. The existence of this file suggests to me that you can configure rospy to use your custom stream handler without touching rospy code itself, but I'm sure PR's to improve rospy are welcome.

Cheers, Niko

Hi Andrzej,

so rosconsole is purley a C++ logging related package. rospy's logging seems to be somewhat unrelated. In particular the logging with rospy tutorial makes no mention of such a configuration of the output.

The only mention of ROSCONSOLE_FORMAT in https://github.com/ros/ros_comm is in C++ code and the code that seems to implent the output formatting in rospy is also pretty clearly not configurable in such a way.

It's probably pretty straight forward to implement support for that environment variable also for rospy. The existence of this file suggests to me that you can configure rospy to use your custom stream handler without touching rospy code itself, but I'm sure PR's to improve rospy are welcome.

Cheers, Niko

Edit: Check out the python logging module extesive configuration capabilities here: https://docs.python.org/2/library/logging.config.html