Robotics StackExchange | Archived questions

How do I stop roscpp from logging?

roscpp writes files under ${ROS_LOG_DIR:-${ROS_HOME:-${HOME}/.ros}/log}. Assuming an environment where there is no disk space and/or no mounted, writable volume, what can I do to stop roscpp from writing logs?

Here's some things I've tried that don't work:

Here's something that does work, but requires nullfs:

Asked by rubicks on 2019-10-15 16:32:12 UTC

Comments

Answers

I've not verified whether this works, but according to wiki/rosconsole - Disable all logging:

7.1 With a configuration file

Create a custom rosconsole configuration file with the following content and use it as described above:

log4j.threshold=OFF

There have been users reporting difficulty using it though: #q292112.

It's also discussed in ros/ros_comm#139.

I seem to remember some files will still be created, but I'm not sure about that.

Edit: I believe ros/ros_comm#1425 is meant to fix that. Documented here: wiki/rosout - rosout.log:

rosout node by default logs all messages into rosout.log in the ROS log directory.

New in Melodic This can be disabled by setting environment variable ROSOUT_DISABLE_FILE_LOGGING to True when launching roscore.

Asked by gvdhoorn on 2019-10-16 01:49:39 UTC

Comments

I can confirm that, on my host with kinetic installed, the log4j.threshold=OFF within ${ROSCONSOLE_CONFIG_FILE} (which has also been exported) has no effect.

Asked by rubicks on 2019-10-16 17:17:55 UTC