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

Priority in rospy loglevel configuration

asked 2012-10-26 10:16:45 -0500

130s gravatar image

updated 2012-10-26 10:32:47 -0500

This wiki page show 2 ways to change log level of rospy; using rospy.init_node in code or using $ROS_ROOT/config/python_logging.conf file. I'm seeing with my system that when both ways are used, the code level config is dominant (meaning, setting in python_logging.conf is ignored). Am I correct? And if so, is there a way to make python_logging.conf reigns?

Here you can look at the python_logging.conf file I used , which I found at /opt/ros/fuerte/etc/ros/python_logging.conf, modified accordingly and moved to $ROS_ROOT/config/.

fuerte, Ubuntu 12.04

edit retag flag offensive close merge delete

Comments

2

Good question; unfortunately I don't know the answer. But one quick comment: you shouldn't modify files under $ROS_ROOT; instead point the ROS_PYTHON_LOG_CONFIG_FILE environment variable to the location of your updated conf file, as described on the wiki page you linked to.

Martin Günther gravatar image Martin Günther  ( 2012-10-27 22:17:57 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2013-08-27 17:19:11 -0500

tfoote gravatar image

I believe setting the logging level in code is always going to take precedence. As such you should rarely use it and only for temporary debugging. Use the config file if you need it at startup or use rqt_logger_level to set it at runtime.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-26 10:16:45 -0500

Seen: 554 times

Last updated: Aug 27 '13