-
Notifications
You must be signed in to change notification settings - Fork 83
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
Added LogHandler, this enables the possibility to change the behavior when logging messages with this library. #40
Conversation
This makes it less likely that the log macros with have same name as log macros in the application where this library is used.
@fmauch yes it is an alternative to #32.
@fmauch To not take too much of your time, I will ask @t-schnell to review it. But you are more than welcome. |
I've tested it yesterday with a minimal example I have, where I created my own logger. It worked well. I think, it would be good to also add some documentation on how to include this into your own application. Also, it might be good to set the default logging mechanism to WARN to reduce the default amount of output. |
Thanks for the contribution @fmauch, that is a good idea. I will update the pr today. |
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.
Looks good to me. I'm holding this back, as the ROS driver needs a patch before merging this. A couple of LOG_XXXX
macros have made it into the driver which will result in build failures.
…ge the behavior when logging messages with this library.
I've rebased and cleaned up this branch. As soon as CI runs through, I'll merge in those changes. |
Thanks @urmahp for this contribution! |
I have renamed the log macros to something more specific to this library, this make the macros less likely to clash with other macros in the project, where this library is used.
I have added a default log handler which is used as default and as long as no other loghandler is enabled.