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

Get node's logger name from rcl #433

Merged
merged 5 commits into from
Feb 26, 2018
Merged

Get node's logger name from rcl #433

merged 5 commits into from
Feb 26, 2018

Conversation

dhood
Copy link
Member

@dhood dhood commented Jan 23, 2018

connects to ros2/rcl#212

I have a question on this PR. Which approach is more appropriate in the context of node interfaces:

  1. logging interface directly calling through to rcl using the node handle (this commit), or
  2. going through node_base (this commit)?

It's not clear to me since on one hand the logger name is used (only) by the logging interface, but on the other hand at the rcl level it is tightly coupled to what seems to be the node "base".

@dhood dhood added the in progress Actively being worked on (Kanban column) label Jan 23, 2018
@dhood dhood self-assigned this Jan 23, 2018
@dhood dhood mentioned this pull request Jan 24, 2018
2 tasks
@dirk-thomas
Copy link
Member

I am leaning towards the first option since imo the second one keeps adding more and more API to the node / interfaces (which I am not a big fan of). But I don't mind either way and would let others comment on this which are more familiar with the pros / cons of the two options.

@wjwwood
Copy link
Member

wjwwood commented Jan 30, 2018

Option 3?

Provide the get_logger_name() function on the NodeLoggingInterface and "dog food" it (if possible, essential option 1 if not possible) in the NodeLogging implementation, so that if it is used from outside, it can be mocked via the NodeLoggingInterface pure virtual base class.

@dhood dhood added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Feb 13, 2018
@dhood
Copy link
Member Author

dhood commented Feb 20, 2018

waiting for review @ros2/team

Copy link
Contributor

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

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

this looks good to me. You may want to have an approval from @dirk-thomas or @wjwwood though.

@dhood dhood merged commit 787de6e into master Feb 26, 2018
@dhood dhood deleted the node_logger_name branch February 26, 2018 22:36
@dhood dhood removed the in review Waiting for review (Kanban column) label Feb 26, 2018
@dhood dhood mentioned this pull request Feb 26, 2018
14 tasks
nnmm pushed a commit to ApexAI/rclcpp that referenced this pull request Jul 9, 2022
Signed-off-by: Miaofei <miaofei@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants