Add support for logging services#643
Open
romainreignier wants to merge 1 commit into
Open
Conversation
Fixes ros2-rust#642 Signed-off-by: Romain Reignier <rreignier@hiphen-plant.com> Assisted-by: Claude:claude-4.7-opus
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.
This is my attempt to fix #642, largely inspired by the parameters services.
A few notes:
humble, the logging services have been added for the Iron release.enable_logger_service()and notstart_logger_services()like for the parameters because I have used the same wording than rclcpp, is that ok or do you prefer to be consistent with the parameter services option?LogSeverity::from_native()that was used only in the tests toLogSeverity::try_from()that seems more idiomatic to me and not panic on error but returns a custom error.rcutils_logging_set_logger_level()in case of an error to set thereasonfield of the service response. I must confess that I have followed Claude Code for this:Assisted-by: Claude:claude-4.7-opus