Skip to content
Merged
Changes from all commits
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
15 changes: 12 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,25 @@ another_node:
string_param: bar
```

#### Logging level
#### Logging level assignments

Minimum logging level can be externally set using the `--log-level` option.
Minimum logging level can be externally set either globally or per logger using the `--log-level` option.

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
```

Loggers can be set using the `--log-level` option as well:

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

The minimum logging level of a specific logger will override the globally specified minimum logger level.
If a logging level is specified more than once in the passed command line arguments, the last one prevails.

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

#### External logging configuration
Expand Down