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
Add QUILL_SHOULD_LOG macro #187
Comments
odygrd
added a commit
that referenced
this issue
Sep 23, 2022
hello, thanks for reporting. A compile time check has been added to previous The below should have equivalent behaviour to the requested SHOULD_LOG macro : if (logger->should_log<LogLevel::TraceL1>()) {
... // do some processing
LOG_TRACE_L1(logger, ...);
}``` |
odygrd
added a commit
that referenced
this issue
Sep 23, 2022
odygrd
added a commit
that referenced
this issue
Sep 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, to conditionally do some processing before logging, you do it like this:
If
QUILL_ACTIVE_LOG_LEVEL
is set toQUILL_LOG_LEVEL_DEBUG
or higher, theLOG_TRACE_L1
will not be compiled in, but the remaining code will be. It seems like there should be a macro instead such that the code above becomes:The macro would just evaluate to
false
whenQUILL_ACTIVE_LOG_LEVEL
is set toQUILL_LOG_LEVEL_DEBUG
or higher.The text was updated successfully, but these errors were encountered: