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

Macro defined log messages #8

Open
hmartiro opened this issue Jan 28, 2015 · 1 comment
Open

Macro defined log messages #8

hmartiro opened this issue Jan 28, 2015 · 1 comment

Comments

@hmartiro
Copy link
Owner

So that we can have debug/trace log messages that are included at compile time only when compiled in Debug mode. Right now, we can set the log level but having arguments of debug and trace messages evaluated slows down the system.

@hmartiro
Copy link
Owner Author

Perhaps something like

WARNING(logger << "my message");

to replace

logger.warning() << "my message";

where the macro expansion is something like

if(logger.level() >= log::Warning) {
    logger.warning() << "my message";
}

Might also be worth splitting off the logger into its own repository and making it header-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant