Rosanswers logo


I'm sure this is a noob question but I looked in the wiki and in here for a long time and I could not find the answer.

Is there any way of creating a node that will subscribe to the INFO level rosout logs? Basically, I would like to do a Python node that will react to an INFO message being sent to rosout.

Thanks in advance!

Originally posted by Carlitos on ROS Answers with karma: 41 on 2012-05-07

Post score: 4

Original comments

Comment by Carlitos on 2012-05-12:
Thanks Lorenz, I tried subscribing to rosout_agg before but I cannot get anything out of it. The messages that I want to read are there (I confirmed with rostopic echo rosout_agg) but my subscriber doesn't work. Is there something wrong with this: rospy.Subscriber("rosout_agg", String, callback)?

Comment by Lorenz on 2012-05-15:
Yes. The type String is wrong. rosout's topic type is rosgraph_msgs/Log.


1 Answer 1


Rosanswers logo

Nodes send log messages on the topic /rosout. These messages are then received by the rosout node and republished on /rosout_agg. You can subscribe one of these topics, /rosout_agg should be preferred though because subscribing to /rosout might lead to many socket connections to all the nodes running on your system. Have a look at the message type of /rosout_agg, which is rosgraph_msgs/Log (UPDATE 20200326 by @130s for clarity). It should contain all the information you need, i.e. the log level and the message.

Please note that info log messages are only published if the logger level of the node that is sending the log message is set to Info or Debug.

Originally posted by Lorenz with karma: 22731 on 2012-05-08

This answer was ACCEPTED on the original site

Post score: 5


Your Answer

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