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

Commit

Permalink
Turn on logger's interest cache (paritytech#11264)
Browse files Browse the repository at this point in the history
  • Loading branch information
koute authored and DaviRain-Su committed Aug 23, 2022
1 parent b8c4678 commit 0ec3c11
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
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

0 comments on commit 0ec3c11

Please sign in to comment.