-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ensure that logger context name is used instead of MYNAME #420
Conversation
Benchmark results for collatzParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
Benchmark results for BadBoggleSolver_runParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
include/logger.hpp
Outdated
@@ -118,7 +118,7 @@ void LOG_set_logs_allowed_function(LogsAllowedCallback logs_allowed_function); | |||
#define LG_IF_LVL_OK(level, ...) \ | |||
do { \ | |||
if (unlikely(LOG_is_logging_enabled_for_level(level))) { \ | |||
olprintfln(ABS(level), -1, MYNAME, __VA_ARGS__); \ | |||
olprintfln(ABS(level), -1, nullptr, __VA_ARGS__); \ |
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.
Minor:
It is slightly strange to put a nullptr here.
I understand that we default to the context name
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.
LGTM
Please update description before merging 🙇
5467ef9
to
d0dd23e
Compare
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.
LGTM
What does this PR do?
Ensure that
LOG_setname
effectively changes name on log lines.Motivation
Before this change, setting name with
LOG_setname
had no effect because all log macros were passingMYNAME
as name to log function, that would override name set withLOG_setname
.