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

Parse log level from string #107

Merged
merged 4 commits into from
Jun 12, 2018
Merged

Parse log level from string #107

merged 4 commits into from
Jun 12, 2018

Conversation

dhood
Copy link
Member

@dhood dhood commented Jun 8, 2018

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
Copy link
Member

@wjwwood wjwwood left a comment

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.

None yet

2 participants