Add optional tracing feature for development logging#12
Add optional tracing feature for development logging#12
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. |
JannesBrands
left a comment
There was a problem hiding this comment.
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::tracingmodule to enable tracing, if thetracingfeature is enabled. Otherwise, the macros provided by theag_iso_stack::tracingmodule 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 theDrivers.