Add per composable node log_level support#531
Open
penww wants to merge 1 commit into
Open
Conversation
Signed-off-by: Peng Wang <penwang@qti.qualcomm.com>
fujitatomoya
requested changes
Apr 23, 2026
Contributor
fujitatomoya
left a comment
There was a problem hiding this comment.
test would be ideal too.
| 'ERROR': rcl_interfaces.msg.Log.ERROR, | ||
| 'FATAL': rcl_interfaces.msg.Log.FATAL, | ||
| } | ||
| request.log_level = log_level_map.get(log_level_str, 0) |
Contributor
There was a problem hiding this comment.
this fallback is NOT great for the user application. if user sets typos log_level='debig', it silently sets it to UNSET and the user will not be notified configuration gone wrong. i think that this behavior is actually worse then raising the exception, what do you think? i say, we should enforce the check and return error would be better. and again this should be done with rclpy get_logging_severity_from_string?
| log_level_str = perform_substitutions( | ||
| context, composable_node_description.log_level).upper() | ||
| log_level_map = { | ||
| 'DEBUG': rcl_interfaces.msg.Log.DEBUG, |
Contributor
There was a problem hiding this comment.
should be rcl_interfaces.msg.LoggerLevel.
| 'DEBUG': rcl_interfaces.msg.Log.DEBUG, | ||
| 'INFO': rcl_interfaces.msg.Log.INFO, | ||
| 'WARN': rcl_interfaces.msg.Log.WARN, | ||
| 'WARNING': rcl_interfaces.msg.Log.WARN, |
Contributor
There was a problem hiding this comment.
docstring does not mention about this string though... we should add it to the help docstring?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes # (ros2/rclcpp#3091)
Is this user-facing behavior change?
No, this change add new parameter for
ComposableNode, not affect the existing functions.Did you use Generative AI?
Yes, partially with Claude Sonnet 4.6.
Additional Information
Example for per component log level feature enabled:
Related PR: ros2/rclcpp#3092, ros2/ros2cli#1212