Skip to content

Commit 9e8dd15

Browse files
laanwjrustyrussell
authored andcommitted
cln-plugin: Change default log level filter back to INFO
In commit 60e1532 (released in crate 0.1.8), which switched the logging framework to tracing-subscriber, the default log level filter was (accidentally) set to ERROR and above, instead of INFO and above. Change this back to INFO as it was before. It can still be overridden with CLN_PLUGIN_LOG. Follows the example in https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#method.from_env Closes #7658. Changelog-Fixed: cln-plugin: Change default log level filter back to INFO
1 parent bfe0557 commit 9e8dd15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/src/logging.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ mod trace {
8080
where
8181
O: AsyncWrite + Send + Unpin + 'static,
8282
{
83-
let filter = tracing_subscriber::filter::EnvFilter::from_env("CLN_PLUGIN_LOG");
83+
let filter = tracing_subscriber::filter::EnvFilter::builder()
84+
.with_default_directive(tracing_subscriber::filter::LevelFilter::INFO.into())
85+
.with_env_var("CLN_PLUGIN_LOG")
86+
.from_env_lossy();
8487
let sender = start_writer(out);
8588

8689
tracing_subscriber::registry()

0 commit comments

Comments
 (0)