mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-09-30 22:40:34 +00:00

## Motivation Currently, most crates in `tracing` are configured to deny all compiler warnings when compiling tests. This means that if the compiler reports any warnings, the build will fail. This can be an issue when changes are made locally that introduce warnings (i.e. unused code is added, imports are no longer needed, etc) and a contributor wishes to test an incomplete state to ensure their changes are on the right path. With warnings denied, tests will not run if the project contains any warnings, so contributors must either fix all warnings or disable the deny attribute. Disabling the deny attribute when making changes locally has become a fairly common practice, but it's error-prone: sometimes, the deny attribute is commented out and then accidentally committed. ## Solution This branch removes all `#![deny(warnings)]` attributes, in order to allow code with warnings to compile and be tested locally while changes are in progress. We already have [a CI job][1] that checks for compiler warnings by trying to compile `tracing` with `RUSTFLAGS="-Dwarnings"`. If we make this CI job required rather than allowing it to fail, we'll still be able to ensure that no code with warnings is merged. Additionally, I've updated all crates to use the same consistent list of lints to apply in the `#![warn]` attribute. Previously, some crates warned on more lints than others, which is not great. I've fixed all the new warnings produced by the additional lints. * chore: consistent warnings, don't deny locally * fix warnings from new attributes * remove warning that no longer exists on nightly Signed-off-by: Eliza Weisman <eliza@buoyant.io>
tracing-log
log
compatibility for tracing
.
Documentation | Chat (gitter) | Chat (discord)
Overview
tracing
is a framework for instrumenting Rust programs with context-aware,
structured, event-based diagnostic information. This crate provides
compatibility layers for using tracing
alongside the logging facade provided
by the log
crate.
This crate provides:
LogTracer
, alog::Log
implementation that consumeslog::Record
s and outputs them astracing::Event
.TraceLogger
, atracing::Subscriber
implementation that consumestracing::Event
s and outputslog::Record
, allowing an existing logger implementation to be used to record trace events.
License
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tracing by you, shall be licensed as MIT, without any additional terms or conditions.