Skip to content

Get node's logger name from rcl - #433

Merged
dhood merged 5 commits into
masterfrom
node_logger_name
Feb 26, 2018
Merged

dhood merged 5 commits into
masterfrom
node_logger_name

Conversation

@dhood

@dhood dhood commented Jan 23, 2018

Copy link
Copy Markdown
Member

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
Copy Markdown
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

wjwwood commented Jan 30, 2018

Copy link
Copy Markdown
Member

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

dhood commented Feb 20, 2018

Copy link
Copy Markdown
Member Author

waiting for review @ros2/team

@Karsten1987 Karsten1987 left a comment

Copy link
Copy Markdown
Contributor

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>
bartalor pushed a commit to bartalor/rclcpp that referenced this pull request Jul 15, 2026
* Get logger name from rcl [direct]

* Get logger name from rcl [indirect]

* Update tests

* fixup on variable usage

* Move get_logger_name to NodeLogging interface
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.

4 participants