You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the default logger rcl_logging_spdlog always tries to write to the file system, and errors if it can't. This prevents it from being used on systems with read-only file systems. It should be configurable to allow outputting to the console only.
Related discussion #86 (comment)
Summary: New environment variable RCL_LOGGING_OUTPUT_SINK that defaults to console,file if unset.
The text was updated successfully, but these errors were encountered:
Currently the default logger rcl_logging_spdlog always tries to write to the file system, and errors if it can't. This prevents it from being used on systems with read-only file systems. It should be configurable to allow outputting to the console only.
So after reading through the logging code the last couple of weeks, I actually think we don't need a new environment variable at all.
The way that logging works is that as log messages come through the rcutils layer, a callback into rcl gets called. That callback formats the log message, and then figures out where to send it:
To the console via rcutils
To disk via rcl_logging_spdlog
To the network via /rosout
In turn, it is possible to enable or disable each of those at node initialization time. For instance, to have messages only go out to the console (and not written to disk or to the network):
ros2 run demo_nodes_cpp talker --ros-args --disable-external-lib-logs --disable-rosout-logs
And this can even be set on a per-composable node basis. So I think we have this functionality already, we just don't have it well documented.
Currently the default logger
rcl_logging_spdlog
always tries to write to the file system, and errors if it can't. This prevents it from being used on systems with read-only file systems. It should be configurable to allow outputting to the console only.Related discussion #86 (comment)
Summary: New environment variable
RCL_LOGGING_OUTPUT_SINK
that defaults toconsole,file
if unset.The text was updated successfully, but these errors were encountered: