Ask Your Question
2

Is it possible to save the rxloggerlevel level's?

asked 2011-07-12 21:00:47 -0500

quimnuss gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2011-07-12 22:21:48 -0500

dornhege gravatar image

updated 2011-07-13 00:27:11 -0500

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:

log4j.logger.ros.PACKAGE=DEBUG
edit flag offensive delete link more

Comments

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...)
quimnuss gravatar imagequimnuss ( 2011-07-13 21:07:14 -0500 )edit
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.
dornhege gravatar imagedornhege ( 2011-07-13 21:46:29 -0500 )edit
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.
Lorenz gravatar imageLorenz ( 2011-07-13 21:53:00 -0500 )edit
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.
bhaskara gravatar imagebhaskara ( 2011-07-14 04:21:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-12 21:00:47 -0500

Seen: 259 times

Last updated: Jul 13 '11