Ensure that logger context name is used instead of MYNAME#420
Merged
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
|
r1viollet
reviewed
Jul 30, 2024
| do { \ | ||
| if (unlikely(LOG_is_logging_enabled_for_level(level))) { \ | ||
| olprintfln(ABS(level), -1, MYNAME, __VA_ARGS__); \ | ||
| olprintfln(ABS(level), -1, nullptr, __VA_ARGS__); \ |
Collaborator
There was a problem hiding this comment.
Minor:
It is slightly strange to put a nullptr here.
I understand that we default to the context name
r1viollet
previously approved these changes
Jul 30, 2024
r1viollet
left a comment
Collaborator
There was a problem hiding this comment.
LGTM
Please update description before merging 🙇
nsavoire
force-pushed
the
nsavoire/fix_log_context_for_library
branch
from
July 30, 2024 09:43
5467ef9 to
d0dd23e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Ensure that
LOG_setnameeffectively changes name on log lines.Motivation
Before this change, setting name with
LOG_setnamehad no effect because all log macros were passingMYNAMEas name to log function, that would override name set withLOG_setname.