You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let config = ConfigBuilder::default().set_time_level(LevelFilter::Error).set_location_level(LevelFilter::Error).build();let _ = CombinedLogger::init(vec![TermLogger::new(LevelFilter::Trace,
config.clone(),TerminalMode::Mixed,ColorChoice::Auto,),WriteLogger::new(LevelFilter::Trace,
config,File::create("file.log").expect("Failed to create a file logger!"),),]).expect("Failed to create a combined logger!");
It will print time level and location data for all message levels (not just error). The only way I found to modify the behavior was to use the Off level, which does turn it off but it does so for all levels, which is quite different and nowhere near as useful.
The text was updated successfully, but these errors were encountered:
Well, after playing around with it some more, I'm wondering if it's not due to me misunderstanding the intended purpose of these methods.
I assumed you're supposed to use it to sort of limit the information "from above", so to speak. As in, if you set a location filter to, say, info, I'd expect error to still print in full detail (as surely it's more important to know the location then than for every trace).
Consider the following code:
It will print time level and location data for all message levels (not just error). The only way I found to modify the behavior was to use the
Off
level, which does turn it off but it does so for all levels, which is quite different and nowhere near as useful.The text was updated successfully, but these errors were encountered: