Development Repository
https://github.com/fujitatomoya/ros2cli/tree/ros2log-rolling
Node Granurality
at this phase, there is a constraint that is ros2log can only manage node granurality but loggers under the node.
Support Loggers under Node Namespace
see https://github.com/openrobotics/reps/blob/main/_posts/rep-0156%3A2026.md#api-extensions and #1148 (comment).
this is 2nd enhancement step to support loggers under node namespace to manage via ros2 log commands.
Description
Provide a dedicated ros2log command group in ros2cli repository to inspect and manipulate ROS 2 runtime logging configuration on nodes. This would unify and improve the user experience for logging-related actions (such as setting/getting log level) compared to the existing scattered approaches (e.g., ad-hoc subcommands or raw service calls).
Motivation
Logging configuration from the command line is limited or inconsistent (e.g., only default log-level flags in some commands), and there is no central dedicated CLI for logging operations. As ROS 2 logging is crucial for debugging and production diagnostics, users need a clear and ergonomic CLI to interact with it.
- Consistent CLI UX for logging across ROS 2.
- Avoids error-prone workflows (e.g., manual service calls).
- Makes logging control discoverable via ros2 log --help.
- Facilitates production debugging and runtime introspection.
Design / Implementation Considerations
Proposed Functionality: Introduce a new ros2 log CLI with subcommands
| Subcommand |
Description |
ros2 log list |
List nodes that support runtime log configuration |
ros2 log levels |
Show all valid log level values (e.g., DEBUG, INFO, WARN, ERROR, FATAL) |
ros2 log get <node> |
Retrieve the current log level of a node (Could optionally show all loggers under that node) |
ros2 log set <node> <level> |
Set the log level of a node |
ros2 log watch <node> <level> |
Tail/monitor logs from a node via rosout (it tries to enable content filtering from rmw implementation) |
ros2 log describe <node> |
Display metadata (available loggers, effective levels). |
Note that above are just ideas, we might need more options and arguments for basic design.
We probably need to add some facility or API for client interface to get available logger names in the node from the logger hash map maintained in rcutils.
It would be nice to manage the endpoints with --all/-a options to set(reset) the logger levels globally.
Additional Information
Related Information:
Development Repository
https://github.com/fujitatomoya/ros2cli/tree/ros2log-rolling
Node Granurality
ros2 log watch: support ros2log watch fujitatomoya/ros2cli#1ros2 log list: Add list subcommand fujitatomoya/ros2cli#2ros2 log level: support "ros2 log levels". fujitatomoya/ros2cli#3ros2 log get <node>:ros2 log set <node>:at this phase, there is a constraint that is
ros2logcan only manage node granurality but loggers under the node.Support Loggers under Node Namespace
see https://github.com/openrobotics/reps/blob/main/_posts/rep-0156%3A2026.md#api-extensions and #1148 (comment).
this is 2nd enhancement step to support loggers under node namespace to manage via
ros2 logcommands.ros2 log describe: T.B.DDescription
Provide a dedicated
ros2logcommand group inros2clirepository to inspect and manipulate ROS 2 runtime logging configuration on nodes. This would unify and improve the user experience for logging-related actions (such as setting/getting log level) compared to the existing scattered approaches (e.g., ad-hoc subcommands or raw service calls).Motivation
Logging configuration from the command line is limited or inconsistent (e.g., only default log-level flags in some commands), and there is no central dedicated CLI for logging operations. As ROS 2 logging is crucial for debugging and production diagnostics, users need a clear and ergonomic CLI to interact with it.
Design / Implementation Considerations
Proposed Functionality: Introduce a new ros2 log CLI with subcommands
ros2 log listros2 log levelsros2 log get <node>ros2 log set <node> <level>ros2 log watch <node> <level>rosout(it tries to enable content filtering from rmw implementation)ros2 log describe <node>Note that above are just ideas, we might need more options and arguments for basic design.
We probably need to add some facility or API for client interface to get available logger names in the node from the logger hash map maintained in rcutils.
It would be nice to manage the endpoints with
--all/-aoptions to set(reset) the logger levels globally.Additional Information
Related Information: