-
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
Add optional tracing feature for development logging #12
base: main
Are you sure you want to change the base?
Conversation
62fed95
to
6c2a036
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #12 +/- ##
==========================================
- Coverage 11.52% 10.89% -0.63%
==========================================
Files 17 17
Lines 2664 2624 -40
==========================================
- Hits 307 286 -21
+ Misses 2357 2338 -19 ☔ View full report in Codecov by Sentry. |
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.
Like a lot your optional tracing feature. But is the intention to use it only on the can driver layer or also for network management and other stuff? Would like to use it in all the library cause it helps also a lot to debug in the field. Another idea would be to have a possibility to activate it manually for single parts of the library. Cause with all that bus traffic the console would be a complete mess. For example to just trace the 11783-6 or only the network management...
I intend to use it anywhere it's useful!
Yeah, this would be awesome - but I'm not quite sure how to do that right now. I think for now it can be enabled/disabled globally until it becomes a problem?
Yes it would be 😆 - my original plan when I started this was to add it during development of a feature, and then remove it once I'm confident that feature works, but I like your idea of enabling it for different parts of the library more ❤️ |
I would like to have a custom tracing for each module/folder like in #26 where it prints for example: |
dc2d922
to
cdbdb18
Compare
I suspect this lint was added to clippy since we last merged to main, and that the CI/CD pipeline uses the latest clippy release.
This PR adds optional tracing instrumentation in the
ag_iso_stack::tracing
module to enable tracing, if thetracing
feature is enabled. Otherwise, the macros provided by theag_iso_stack::tracing
module compile away.I expect this to be a helpful developer feature, that I don't expect a user to want to use. I also expect that as AgIsoStack-rs grows, we'd probably want to remove the
tracing::trace!
macros in theDriver
s.