Cannot get ROS_INFO, ROS_DEBUG, etc to print to log file

asked 2016-11-06 06:29:18 -0500

epsilonjon gravatar image

Hi.

When using ROS_INFO, ROS_DEBUG, etc in my C++ node, the messages appear in the terminal but are not written to the log file (.ros/log/latest/rosout.log) and also do not appear in rqt_console. I have tried changing the logging level in rqt_console, and also programatically with

if( ros::console::set_logger_level(ROSCONSOLE_DEFAULT_NAME, ros::console::levels::Debug) ) {
   ros::console::notifyLoggerLevelsChanged();
}

but no luck. I should mention that other debug messages do appear (ones generated by ROS itself), just not my own ones.

Does anyone know what I am doing wrong?

Thanks for your help.

edit retag flag offensive close merge delete

Comments

How do you start your node? Have you tried to launch it with output="log"? roslaunch/node/output

NEngelhard gravatar imageNEngelhard ( 2016-11-06 09:10:51 -0500 )edit