-
Notifications
You must be signed in to change notification settings - Fork 403
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
iox-#1755 Redirect printing in the platform layer to the logger #2222
iox-#1755 Redirect printing in the platform layer to the logger #2222
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2222 +/- ##
==========================================
- Coverage 78.62% 78.51% -0.12%
==========================================
Files 429 431 +2
Lines 16538 16629 +91
Branches 2308 2333 +25
==========================================
+ Hits 13003 13056 +53
- Misses 2682 2707 +25
- Partials 853 866 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
|
cd0f69c
to
a97ddbe
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.
I really like it. This is also something we should do for iceoryx2, there we have the same problem. I created there an issue to address this in the future: eclipse-iceoryx/iceoryx2#154
std::atomic<LoggerExchangeState> logger_exchange_state{LoggerExchangeState::DEFAULT}; | ||
}; | ||
|
||
IceoryxPlatformLogger& active_logger(IceoryxPlatformLogBackend new_log_backend) |
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.
I assume this code was copied from some place else?!
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.
Well, I got inspired :)
I couldn't use the approach from the hoofs logger since it was not possible to expose the atomics so I needed to get creative and came up with this solution. I might even move it to the hoofs logger since it does not require a mutex.
Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)iceoryx_hoofs
are added to./clang-tidy-diff-scans.txt
Notes for Reviewer
This PR redirects the output from the platform to the hoofs logger once the hoofs logger is initialized.
Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References