-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: add a logging interface, dependency injectable loggers #233
Conversation
Signed-off-by: Max SCHMELLER <[email protected]>
Signed-off-by: Max SCHMELLER <[email protected]>
Signed-off-by: Max SCHMELLER <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #233 +/- ##
=======================================
Coverage 26.10% 26.10%
=======================================
Files 100 100
Lines 9218 9218
Branches 2215 2215
=======================================
Hits 2406 2406
Misses 6423 6423
Partials 389 389
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Signed-off-by: Max SCHMELLER <[email protected]>
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!
PR Type
Related Links
Description
This PR adds an abstract
nebula::drivers::loggers::Logger
interface that provides the following functions:debug(msg)
info(msg)
warn(msg)
error(msg)
child(name) -> std::shared_ptr<Logger>
which creates a child logger (names are concatenated with.
)A
NEBULA_LOG_STREAM(log_func, stream_args)
macro is also provided for convenience.There are currently two implementations of this interface:
nebula::drivers::loggers::ConsoleLogger
(innebula_common
)nebula::drivers::loggers::RclcppLogger
(innebula_ros
)The motivation of this PR is to, in the long run, remove the dependency on RCLCPP from all Nebula packages except
nebula_ros
.Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks