log: Support structured values #341
Labels
crate/log
Related to the `tracing-log` crate
kind/feature
New feature or request
needs/design
Additional design discussion is required.
Feature Request
Crates
tracing-log
Motivation
Large applications may use libraries or components that use a combination of the
log
crate andtracing
. We can support better diagnostics in these applications by making the most of the shared feature-set betweenlog
andtracing
. 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 withtracing
.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 withtracing
. Sincetracing
already makes some concessions tolog
support (by handling it explicitly in its event macros) I'm guessing we've got a little flexibility on thetracing
side too.I'm proposing we aim for zero-cost structured integration between
log
andtracing
by leveraging the existing hook in the event macros and using thelog::kv
APIs to translate between them.The text was updated successfully, but these errors were encountered: