Skip to content
Merged
Changes from 4 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
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
#### 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
```

Some specific loggers can be set using the `--log-level` option as well:
Copy link
Member

Choose a reason for hiding this comment

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

So does Some here mean there are loggers you cannot set this way? If not, I'd drop it. If so, then I think we need some clarification on that.


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

```

The minimum logging level of a specific logger will override the globally specified minimum logger level.

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

#### External logging configuration
Expand Down