You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The log crate is decent and easy to support, but it lacks some of the nicer features of more powerful logging systems like tracing. For example, it'd be nice to have an easier way to disable all log statements in a certain crate or module, or of a certain level within a given file, etc. The structured logging and span functionality all look attractive too.
Most importantly, this would help a user/developer more easily filter out the log statements that are of interest to them in a specific testing/debugging scenario. With log macros, we just have to generally enable all logging levels in all crates, and then tediously grep for keywords or file names.
Considerations
The tracing crate does support no_std, but interestingly enough it requires alloc support on no_std. So that means we can use it in most crates, but not all crates (i.e., those that must run during early bootstrap before heap allocation is initialized).
First steps
If anyone is interested in helping out, the best/easiest first step would likely be to play around with tracing as a drop-in replacement for log, which is easy enough because it offers the same basic macros.
The text was updated successfully, but these errors were encountered:
Proposed Benefits
The
log
crate is decent and easy to support, but it lacks some of the nicer features of more powerful logging systems liketracing
. For example, it'd be nice to have an easier way to disable all log statements in a certain crate or module, or of a certain level within a given file, etc. The structured logging and span functionality all look attractive too.Most importantly, this would help a user/developer more easily filter out the log statements that are of interest to them in a specific testing/debugging scenario. With
log
macros, we just have to generally enable all logging levels in all crates, and then tediously grep for keywords or file names.Considerations
The
tracing
crate does supportno_std
, but interestingly enough it requiresalloc
support onno_std
. So that means we can use it in most crates, but not all crates (i.e., those that must run during early bootstrap before heap allocation is initialized).First steps
If anyone is interested in helping out, the best/easiest first step would likely be to play around with
tracing
as a drop-in replacement forlog
, which is easy enough because it offers the same basic macros.The text was updated successfully, but these errors were encountered: