Skip to content

Parse log level from string - #107

Merged
dhood merged 4 commits into
masterfrom
cli_logger_level
Jun 12, 2018
Merged

dhood merged 4 commits into
masterfrom
cli_logger_level

Conversation

@dhood

@dhood dhood commented Jun 8, 2018 •

Copy link
Copy Markdown
Member

connects to ros2/ros2#498

In addition to the enum of severity levels, we have g_rcutils_log_severity_names, which includes the string representation of the enums. That is used for printing the severity of messages to the console (and internally for storing the logger levels in a string map instead of a string-to-int map).

This PR adds a function that lets callers use that array to convert a string severity to an int severity.

It's used in ros2/rcl#256 and ros2/demos#240

@dhood dhood self-assigned this Jun 8, 2018
@wjwwood wjwwood added the in progress Actively being worked on (Kanban column) label Jun 8, 2018
@dhood dhood added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Jun 8, 2018

@wjwwood wjwwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Also TIL about toupper :D

@dhood
dhood merged commit 3595e7c into master Jun 12, 2018
@dhood
dhood deleted the cli_logger_level branch June 12, 2018 15:11
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Jun 12, 2018
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.

2 participants