How do I create a rospy sublogger or sublog

asked 2017-11-15 06:50:40 -0600

knxa gravatar image

updated 2018-01-19 14:21:17 -0600

I think I came across the concept of a sublog somewhere in the ros documentation, but cannot find it anymore. How do I have more than one logger in the same node?

When using rospy.logXXX() the straight forward way, all log messages will end up in a log file named from the node name. I want to be able to use another log destination for some messages, so these messages end up in another file and have another log source name.

Or preferably in both the base-log for the node as well as another topic/file.

How is this possible? It is possible both in c++ as well as in python?

edit retag flag offensive close merge delete

Comments

I'm not quite sure about where the logged Messages will end up file-wise, but there is the concept of named Loggers in roscpp, even though not in rospy

mgruhler gravatar imagemgruhler ( 2017-11-28 01:11:59 -0600 )edit

Thanks a lot for the input. I am fighting with several things related to ROS logging. Not sure if the roscpp named loggers are what I recall to have seen, but my main need for a kind of sublogger is in python :-(

knxa gravatar imageknxa ( 2017-12-01 08:56:24 -0600 )edit