-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RCL_LOGGING_DISABLE_FILE_WRITING to disable file logging #106
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: mganeff <[email protected]>
So I have to say that this is a weird feature. The entire purpose of the So with all of that in mind, can you please explain the use-case for this? |
I understand that I can disable logging for a certain node by using the disable-external-lib-logs argument
I am however unable to find a working solution for disabling logging for nodes started with ros2 launch
In our environment we spawn multiple nodes (20+). For testing we would like to create the logs but for deployment we would like to disable them, hence the env variable to be able to disable/enable external logging features for all nodes :) |
You should be able to declare a launch argument for that, and pass it into all of the nodes. You can see some documentation about that in http://docs.ros.org/en/rolling/Tutorials/Intermediate/Launch/Using-ROS2-Launch-For-Large-Projects.html or http://docs.ros.org/en/rolling/Tutorials/Intermediate/Launch/Using-Substitutions.html |
Thanks for the answer. I managed to disable logging for all my nodes by adjusting the launch files: ros2 launch .xml:
ros2 launch .py:
ros2 run:
I was wondering if there is an environment variable such like DEFAULT_ROS_ARGS which I could extend with --disable-external-lib-logs to be able to toggle logging on/off for our nodes. |
Despite the parameter disable-external-lib-logs, still logs are generated in ~/.ros/log. Each launched node gets a directory with a launch.log. Is there a way to disable this? |
That's the logging coming from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think even if we had a feature something like this, doing this in the specific implementation is not the right place to do that.
I was wondering if there is an environment variable such like DEFAULT_ROS_ARGS which I could extend with --disable-external-lib-logs to be able to toggle logging on/off for our nodes.
no i don't think so. for me this can be scary giant switch if we have it. because we can add remapping, namespace, names, parameters and logging configuration via arguments. i think those arguments are meant to be applied to the Node
, not any Node
. So this could possibly lead to the problem for user.
Add ability to completely disable file writing in rcp_logging_spdlog by setting the environment variable:
RCL_LOGGING_DISABLE_FILE_WRITING=1