Rosanswers logo

I have a launch file launching several nodes and I'm interested on saving a certain configuration of warn/debug/info depending on the node. Is it possible to save a specific configuration or a way of launching it setting the levels accordingly other than changing them manually at every execution?

Originally posted by quimnuss on ROS Answers with karma: 169 on 2011-07-12

Post score: 2


1 Answer 1


Rosanswers logo

Yes. You can set the ROSCONSOLE_CONFIG_FILE environment variable and have that point to a custom log4cxx config that sets the loggerlevels how you want it.

I guess you want to set debug for your package enabled, then use this entry:


Originally posted by dornhege with karma: 31395 on 2011-07-12

This answer was ACCEPTED on the original site

Post score: 4

Original comments

Comment by bhaskara on 2011-07-14:
There's a ros-specific example at http://www.ros.org/wiki/rosconsole#Configuration. Rospy uses a different system based on the Python logging module, described here: http://www.ros.org/wiki/rospy/Overview/Logging. At the bottom of the page it describes how to set up a config file for this.

Comment by Lorenz on 2011-07-13:
Actually, since roscpp is using log4cxx, its documentation on the config file format might be the right one: http://logging.apache.org/log4cxx/index.html. Im not sure if this approach works for rospy though since it doesn't use log4cxx.

Comment by dornhege on 2011-07-13:
There is an example in my post. To check syntax and specifics about rosconsole, click the link in my post and then also look at rosconsole. It's in rosconsole, so I would guess it is loaded in node init.

Comment by quimnuss on 2011-07-13:
Looks like it! So I'd have to create a config file and point the ROSCONSOLE_CONFIG_FILE to it. Where can I find the syntax or an example of a config file? When is it loaded? when roscore is launched? when rxconsole is launched? (I'm sorry the documentation about the subject is too scarce...)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.