prevent rospy.loginfo from logging to file <node>-stdout.log

asked 2019-03-06 08:03:29 -0500

knxa gravatar image

updated 2019-03-06 08:44:47 -0500

I have some python ROS nodes that logs purely with the rosout logger provided with rospy.loginfo etc. This means the same information ends up in two files, example:

  1. MyNode-123.log
  2. MyNode-123-stdout.log

Can I prevent the rosout data to go to the *-stdout.log file?

Besides being redundant, the stdout file has the disadvantage of not "rolling" when it gets large. I don't want to send the log data to the screen either.

Do I need to setup my own python_logging.conf? If so, I would appreciate a tip on how it might look.

(ROS melodic, Ubuntu 18.04)

edit retag flag offensive close merge delete

Comments

So you just want to prevent the log files for the individual nodes from being created? Not disable logging entirely? Is this related to your other question (#q317030)?

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 08:13:00 -0500 )edit

No to all:

  1. I want one log file for each node. For the node MyNode I would like the MyNode-XXX.log, but not the redundant MyNode-stdout.log
  2. No, I do not want to disable logging entirely.
  3. No, the question #q317030 was about the aggregated log file created by the rosout node.
knxa gravatar image knxa  ( 2019-03-06 08:43:25 -0500 )edit

Edited question title for clarity

knxa gravatar image knxa  ( 2019-03-06 08:45:27 -0500 )edit