4

I would like a specific node in my ROS package to display output at the DEBUG verbosity level, while other nodes to display at the INFO level. I am aware of the rosconsole configuration file, and am able to set verbosity for a package with:

log4j.logger.ros.my_package=DEBUG

However, the following does not work:

log4j.logger.ros.my_package.my_node=DEBUG
Brad Saund
  • 191
  • 3
  • 11

1 Answers1

9

The easiest way is running rqt_logger_level GUI. If you have no GUI on robot, you can do that using service :

rosservice call /my_node/set_logger_level "{logger: 'rosout', level: 'debug'}" 

Replace my_node and debug to specify the node and verbosity level, respectively.

Martin
  • 4,738
  • 4
  • 28
  • 57
  • 3
    The specific command that worked for me: rosservice call /[name]/set_logger_level "{logger: 'rosout', level: 'info'}" – Brad Saund Nov 23 '16 at 19:15
  • 3
    A drawback is that you have to rerun it everytime you restart your node, which can be very inconvenient (or even infeasible if it is about output during initialisation). – luator Feb 19 '18 at 12:35