-
Notifications
You must be signed in to change notification settings - Fork 876
Closed
Description
Feature request
Feature description
Ability to configure logging level externally at runtime.
In the future there will be a generalized approach to external configuration of loggers at runtime
Requirements
- ROS 2 application (including ros2cli) can change the logging level for specific node during runtime.
- Node developer can
opt-inthis option viaNode:Options. (in default, this is disabled.) - Node is only be able to set the logging level of logger name that belongs to that node process space.
Implementation Consideration
- GUI tools are not in scope of this issue, this is dedicated to node interface.
- Expose additional service for each node to set and get the logging level of logger name at runtime.
- service path:
/nodename/get_logger_leveland/nodename/set_logger_level.
- service path:
- This could be one of the
Node::Optionsthat useropt-inif they want to. Since this is debug feature and adding extra service, this should not beopt-out. - If using components node, requesting to change logger level to Node-A would be effectively changing logger level in Node-B.
- This is because that logger level hash map is maintained by in the process space.
- logger names and levels are maintained agnostic from node configuration, logging level will be applied once the corresponding node is created.
- Not only for setting the logging level, but also user should be able to know the current logging level via service?
- Probably yes, it is likely that user application might want to check the current logging level during runtime.
rcl_create_node_logger_nameis internally issued and creates logger name for that node, but user application can create otherrclcpp::Loggerif needed.
- ROS 2 system debugging level should be accepted as well by default, such as
rclcpp,rclandrclpy.- This could be really useful to debug ROS 2 core system during application running.
- This feature requires service file must have the field to specify the
logger_nameandlogger_level. - Supporting user callback to be called on service request?
- Probably no, what is the actual use case for this?
Sample Demo
Tasks
- rcl_interfaces Add interfaces for logging service. rcl_interfaces#154
- rclcpp Add support for logging service. rclcpp#2122
- rclpy Logging service support rclpy#1102
- demos Add demos for using logger service demos#611
- ros2_documentation Add logger service description ros2_documentation#3477
- Iron Release Note External configuration services of logger for Iron Release. ros2_documentation#3478
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
