Turn on logger's interest cache (#11264)

This commit is contained in:
Koute
2022-04-26 17:05:51 +09:00
committed by GitHub
parent 5eb2e3292d
commit 94dac682b4
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -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" }
+4 -1
View File
@@ -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 {