add tracing adapter behind optional feature flag#5
Conversation
Cargo.toml
Outdated
| owo-colors = "4.2.3" | ||
| chrono = { version = "0.4.43", default-features = false, features = ["clock"] } | ||
| tracing = { version = "0.1.44", optional = true } | ||
| tracing-subscriber = { version = "0.3.22", optional = true } |
There was a problem hiding this comment.
Don't forget to disable default features if you don't use them
MOZGIII
left a comment
There was a problem hiding this comment.
Looks good at a glance, but see also my comment on the log adapter PR. Also appies here.
Keep in mind that tracing also has a log adapter - so you might to figure out how to deal with this situation where there are both tracing and log features active but there's also a tracing's log adapter enabled.
Also, don't forget to bench - your adapters might be mich quicker or much slower then the original crates themselves - and it'd be good to know.
Yeahh, I'm aware about that! Good catches. I also fixed default-features on the tracing deps. I have two APIs for testing it and benchmarking will be on the radar for a follow-up as well. |
Signed-off-by: Antonio Souza <arfs.antonio@gmail.com>
Signed-off-by: Antonio Souza <arfs.antonio@gmail.com>
39fe228 to
12586e5
Compare
Description
tracing_subscriber::LayerviaSheenLayerso sheen can capture events from thetracingecosystemtracing::info!(),tracing::warn!(), etc. gets routed through sheen's formatterstracingfeature flag (sheen = {features = ["tracing"] })Type of Change
Checklist
cargo fmtrancargo clippypassescargo testpassesCloses #3 (partial)