Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Turn on the logger's interest cache #11264

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rustc-hash = "1.1.0"
serde = "1.0.136"
thiserror = "1.0.30"
tracing = "0.1.29"
tracing-log = "0.1.2"
tracing-log = { version = "0.1.3", features = ["interest-cache"] }
tracing-subscriber = { version = "0.2.25", features = ["parking_lot"] }
sp-tracing = { version = "5.0.0", path = "../../primitives/tracing" }
sp-rpc = { version = "6.0.0", path = "../../primitives/rpc" }
Expand Down
5 changes: 4 additions & 1 deletion client/tracing/src/logging/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ where
let max_level_hint = Layer::<FmtSubscriber>::max_level_hint(&env_filter);
let max_level = to_log_level_filter(max_level_hint);

tracing_log::LogTracer::builder().with_max_level(max_level).init()?;
tracing_log::LogTracer::builder()
.with_max_level(max_level)
.with_interest_cache(tracing_log::InterestCacheConfig::default())
.init()?;

// If we're only logging `INFO` entries then we'll use a simplified logging format.
let detailed_output = match max_level_hint {
Expand Down