Robotics StackExchange | Archived questions

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

Hi.

When using ROSINFO, ROSDEBUG, 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 rqtconsole. I have tried changing the logging level in rqtconsole, 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.

Asked by epsilonjon on 2016-11-06 07:27:01 UTC

Comments

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

Asked by NEngelhard on 2016-11-06 10:10:51 UTC

Answers