-
Notifications
You must be signed in to change notification settings - Fork 163
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
compare the return value to constants #665
compare the return value to constants #665
Conversation
Signed-off-by: Chen Lihui <[email protected]>
rcl/src/rcl/logging.c
Outdated
if (logging_status != 0) { | ||
status = RCL_RET_ERROR; | ||
status = rcl_logging_external_set_logger_level(NULL, default_level); | ||
if (RCL_RET_OK == status) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes a logic, only when log level can be set, then register handler?
Previously registering handler anyway even if log level cannot be set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And I think this is the correct logic. Maybe I was wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fujitatomoya
After consideration, I shouldn't update the original logic while refactoring the source code.
I will update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that original logic is meant to, I'd like to hear from others.
Signed-off-by: Chen Lihui <[email protected]>
I'd actually like to hold off on a change like this. Over in ros2/rcl_logging#33 (comment) , we've been discussing refactoring this interface, and the types that We aren't working on it at the moment, but feel free to start working on that if you'd like. Otherwise, I will probably start taking a look at fixing this up after Foxy is released. |
Thanks for your explanation. I got it and close this PR right now.
Actually, I updated this function because of #664 ( I noticed there is a TODO inside rcl_logging_configure_with_output_handler). |
Signed-off-by: Chen Lihui [email protected]