Update for supporting multiple logging level settings#290
Update for supporting multiple logging level settings#290clalancette merged 7 commits intoros2:gh-pagesfrom
Conversation
Signed-off-by: Chen Lihui <Lihui.Chen@sony.com>
|
To support multiple logging level settings, there might exist some other ways which could be convenient for users, such as But to keep consistent with other arguments that using multiple items and use I wonder if users would like to use the multiple logger level setting as follows, or just use I'd like to hear your opinions. |
for user experience, i'd like to go with |
Co-authored-by: tomoya <Tomoya.Fujita@sony.com>
@fujitatomoya There are some ways to use I think I need to hear others' suggestions. |
|
Option A makes sense if you consider it to be the combination of all specifications given in option B. I think that option B is clearer and easier to parse, though. |
|
What is the order of precedence if someone gives two different logging levels for a single node? |
the last one wins |
|
Then the design document must say that. |
Thanks. But I think it's the policy of all arguments, not just for --log-level. So maybe it should not be recorded here. |
|
If you choose option A then it matters because the argument parser will only see a single argument, and whatever parses that string will need to know what to do. |
After reconsideration, I think I will use option B. (Actually I use option B in the design file). |
|
@gbiggs |
|
I am really good to go with either one. |
|
friendly ping. |
We currently have a lot of inconsistencies on how argument precedence works, I recently opened a PR about that. |
ivanpauno
left a comment
There was a problem hiding this comment.
As @gbiggs suggested, I think it's good to clarify precedence order.
Using a "last specified argument prevails" rule sounds like a good idea.
This proposal is pretty consistent with how we parse other kinds of arguments, 👍 to that!
I would also like to mention that option C sounds reasonable to me. ros2 run package_name exec_name --ros-args -p param1:=value1,param2:=value2That would be a much bigger effort that only implementing the new log level arguments. |
|
@clalancette FYI |
While I have my own personal preferences, I think consistency is more important here. With that in mind, I'd definitely stick with the I would also stick with option B here, as it more closely conforms to what parameters are doing. If we want to expand in the future to support syntax A, we would do it across all of the parameters we support. |
|
I agree with B, until we want to support something like A everywhere, aka C. |
Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Chen Lihui <Lihui.Chen@sony.com>
ivanpauno
left a comment
There was a problem hiding this comment.
I think it's worth clarifying the precedence in the design article.
Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
wjwwood
left a comment
There was a problem hiding this comment.
lgtm
I only had two nitpick comments that could be addressed or ignored.
| 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: |
There was a problem hiding this comment.
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.
| Some specific 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 |
There was a problem hiding this comment.
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.
|
LGTM |
Signed-off-by: Chen Lihui <Lihui.Chen@sony.com> Co-authored-by: William Woodall <william@osrfoundation.org>
Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
|
I'm going to go ahead and merge this with the latest fixes now. Thanks everyone for reviewing this and moving it forward. |
* Update for supporting multiple logging level settings Signed-off-by: Chen Lihui <Lihui.Chen@sony.com> Co-authored-by: tomoya <Tomoya.Fujita@sony.com> Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> Co-authored-by: William Woodall <william@osrfoundation.org>
* Update for supporting multiple logging level settings Signed-off-by: Chen Lihui <Lihui.Chen@sony.com> Co-authored-by: tomoya <Tomoya.Fujita@sony.com> Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> Co-authored-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Chen Lihui Lihui.Chen@sony.com