feat: change log level ffi comms
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
@@ -80,7 +80,7 @@ use log4rs::{
},
Append,
},
- config::{Appender, Config, Root},
+ config::{Appender, Config, Logger, Root},
encode::pattern::PatternEncoder,
};
use num_traits::FromPrimitive;
@@ -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");
