Skip to content

Commit

Permalink
feat: change log level ffi comms (#4973)
Browse files Browse the repository at this point in the history
Description
---
Reduces the log level of comms logs to be Warn or higher, unlike before it was Debug or higher

How Has This Been Tested?
---
manual
  • Loading branch information
SWvheerden authored Nov 30, 2022
1 parent f2cbe6f commit 554e783
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion base_layer/wallet_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ use log4rs::{
},
Append,
},
config::{Appender, Config, Root},
config::{Appender, Config, Logger, Root},
encode::pattern::PatternEncoder,
};
use num_traits::FromPrimitive;
Expand Down Expand Up @@ -4153,6 +4153,36 @@ unsafe fn init_logging(

let lconfig = Config::builder()
.appender(Appender::builder().build("logfile", log_appender))
.logger(
Logger::builder()
.appender("logfile")
.additive(false)
.build("comms", LevelFilter::Warn),
)
.logger(
Logger::builder()
.appender("logfile")
.additive(false)
.build("p2p", LevelFilter::Warn),
)
.logger(
Logger::builder()
.appender("logfile")
.additive(false)
.build("yamux", LevelFilter::Warn),
)
.logger(
Logger::builder()
.appender("logfile")
.additive(false)
.build("dht", LevelFilter::Warn),
)
.logger(
Logger::builder()
.appender("logfile")
.additive(false)
.build("mio", LevelFilter::Warn),
)
.build(Root::builder().appender("logfile").build(LevelFilter::Debug))
.expect("Should be able to create a Config");

Expand Down

0 comments on commit 554e783

Please sign in to comment.