-
Notifications
You must be signed in to change notification settings - Fork 163
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
[FR] select the logger implementation without rebuilding #1178
Comments
I'll state upfront that I'm not against this feature. But are there any practical uses for it? While I think that our logging subsystem has a number of problems, swapping out the disk logging backend at runtime doesn't seem to be one of them. So I'd like to hear about a practical use before we spend time on it. |
the use case (not production yet) that i have off the top of my head, to support 2 (or multiple) logger backend in the same system.
note: i am spending a couple of days for |
@clalancette i developed some PoC based on |
This issue has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-log-system-meets-rsyslog-and-fluentbit/39280/3 |
Feature request
Feature description
Currently there is no way to select the logging backend without building
rcl
.This is because that when building
rcl
, we must choose the logging implementation to be used.In default
rcl_logging_spdlog
is selected ifRCL_LOGGING_IMPLEMENTATION
is not set.But we can change it with
RCL_LOGGING_IMPLEMENTATION
and available logging backend library.e.g
rcl_logging_noop
export RCL_LOGGING_IMPLEMENTATION=rcl_logging_noop colcon build --symlink-install --cmake-clean-cache --packages-select rcl_logging_noop rcl
and, no log files are generated with
rcl_logging_noop
This generates the constraint that whole system needs to use only specified logging backend in this workspace.
It would be nice if we can build the logger backend libraries, and select the logging backend when the program starts.
Implementation considerations
Current related code is,
rcl/rcl/cmake/get_default_rcl_logging_implementation.cmake
Lines 26 to 34 in dcfe9ba
Probably we can escalate
RCL_LOGGING_IMPLEMENTATION
like howRMW_IMPLEMENTATION
works to select the rmw implementation when executing programs.The text was updated successfully, but these errors were encountered: