Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Enable the interest cache for logs
  • Loading branch information
koute committed Oct 21, 2021
commit eeef524806a87f2d5a404d272581cbb5ef5dd0b6
4 changes: 2 additions & 2 deletions client/tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ rustc-hash = "1.1.0"
serde = "1.0.126"
thiserror = "1.0.21"
tracing = "0.1.29"
tracing-log = "0.1.2"
tracing-subscriber = "0.2.19"
tracing-log = { version = "0.1.2", features = ["interest-cache"] }
tracing-subscriber = "0.2.25"
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
sp-rpc = { version = "4.0.0-dev", path = "../../primitives/rpc" }
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
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 @@ -149,7 +149,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 simple = match max_level_hint {
Expand Down