-
Notifications
You must be signed in to change notification settings - Fork 823
Description
Feature Request
Crates
tracing-log
Motivation
Large applications may use libraries or components that use a combination of the log
crate and tracing
. We can support better diagnostics in these applications by making the most of the shared feature-set between log
and tracing
. That means retaining as much structure as possible when pushing diagnostic data between them.
In rust-lang/log#328 we're tracking the progress of structured logging support in the log
crate. One of its stabilization blockers is that it works nicely with tracing
.
Proposal
This is a bit of an open question, we've got flexibility on the log
side to tweak things as needed for better integration with tracing
. Since tracing
already makes some concessions to log
support (by handling it explicitly in its event macros) I'm guessing we've got a little flexibility on the tracing
side too.
I'm proposing we aim for zero-cost structured integration between log
and tracing
by leveraging the existing hook in the event macros and using the log::kv
APIs to translate between them.