Skip to content

Commit

Permalink
Update for supporting multiple logging level settings (ros2#290)
Browse files Browse the repository at this point in the history
* Update for supporting multiple logging level settings

Signed-off-by: Chen Lihui <[email protected]>
Co-authored-by: tomoya <[email protected]>
Co-authored-by: Ivan Santiago Paunovic <[email protected]>
Co-authored-by: William Woodall <[email protected]>
  • Loading branch information
4 people authored and mlanting committed Aug 17, 2020
1 parent 45d3091 commit 3d8af83
Showing 1 changed file with 12 additions and 3 deletions.
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

0 comments on commit 3d8af83

Please sign in to comment.