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

Allow OCL::logging::Category to be property overriden #92

Merged

Conversation

Hugal31
Copy link

@Hugal31 Hugal31 commented Aug 27, 2021

Make OCL::logging::Category::debug(RTT::rt_string const&), info, etc... uses log(log4cpp::Priority, RTT::rt_string const&) so it can be overriden.

Closes #91.

@Hugal31 Hugal31 changed the base branch from master to toolchain-2.10 August 27, 2021 14:23
@snrkiwi
Copy link
Contributor

snrkiwi commented Aug 31, 2021

Does changing debug(), etc., to be virtual achieve the same thing?

@Hugal31
Copy link
Author

Hugal31 commented Aug 31, 2021

Yes, it would.

Copy link
Member

@meyerj meyerj left a comment

Choose a reason for hiding this comment

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

LGTM, thanks. It makes sense as-is.

Does changing debug(), etc., to be virtual achieve the same thing?

@snrkiwi Do you have a use case where you may want to override debug(message) but not log(DEBUG, message)? I think it would be bad, because then the two could eventually behave differently, although the former should be nothing than a simple convenience helper for the latter, no? You can still adapt the behavior for a specific priority only by using an if statement in the overridden log() function.

@meyerj meyerj merged commit 15ad222 into orocos-toolchain:toolchain-2.10 Nov 29, 2021
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.

OCL::logging::Category is not properly overridable
3 participants