Skip to content
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

Update for supporting multiple logging level settings #290

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions articles/150_ros_command_line_arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,24 @@ another_node:
string_param: bar
```

#### Logging level
#### Multiple Logging level assignments
iuhilnehc-ynos marked this conversation as resolved.
Show resolved Hide resolved

Minimum logging level can be externally set using the `--log-level` option.
Logging level assignments have two means of settings which are a global logging level and other logging levels for specific loggers. Minimum logging level can be externally set using the `--log-level` option.
iuhilnehc-ynos marked this conversation as resolved.
Show resolved Hide resolved

As an example, to set logging level to `DEBUG` for `some_ros_executable`, one may execute:
As an example, to set a global logging level to `DEBUG` for `some_ros_executable`, one may execute:

```sh
ros2 run some_package some_ros_executable --ros-args --log-level DEBUG
```

Some specific loggers can be set using the `--log-level` option as well, the format as follows:
iuhilnehc-ynos marked this conversation as resolved.
Show resolved Hide resolved

```sh
ros2 run some_package some_ros_executable --ros-args --log-level talker1:=DEBUG --log-level talker2:=WARN
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to have an example that's not just a node, like maybe rclcpp or talker1.rclcpp or something more interesting like that.

```

Note that the logging level of a specific logger can override the global logging level for this logger.
iuhilnehc-ynos marked this conversation as resolved.
Show resolved Hide resolved

See `rcutils` and `rcl` logging documentation for reference on existing logging levels.

#### External logging configuration
Expand Down