Closed cyphersnake closed 6 months ago
With tracing, the #197 will be easy to rebuild without runtime flags
This is new to me, maybe @chaosma as well. Could you share some example output or some blog post?
This is new to me, maybe @chaosma as well. Could you share some example output or some blog post?
Well specifically here it's just a migration to a different logging crate, fully compatible with log, but with new features. We are not very interested in async support, but they have scope (I put a link to the doc in the PR body) and this feature is very convenient for tracking complex contexts.
As a matter of fact, 'slog' used to be a replacement for 'log' if you needed some extra features, now 'tracing' is becoming such a framework
I'm okay with using tracing
as a logging framework. My question was more about how and when to use the spans.
I'm okay with using
tracing
as a logging framework. My question was more about how and when to use the spans.
We have for example primary & secondary circuit starts inside IVC are identical (except for the input) and we have to look for the point "where logs of this case start" etc.
I've been wanting to introduce them for a long time, but I've been putting it off. But considering Chao's request "sometimes track a certain function", this is solved through scope, since you can track callstack.
I like debug facilities and logs. Logs are as helpful as comments, especially during debugging and instrumentation for optimization. They help developers learn about the internals of a piece of code.
I will let @chaosma approve this and see if the scope feature could address his request.
Motivation This crate supports spans. That is, you can add a context to the logs that will be respected in a certain interval.
https://docs.rs/tracing/latest/tracing/span/index.html
The alternative old & well-tested solution
slog
itself recommends the use oftracing
Overview
tracing
using, just migrate to it everywhere