-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Consider the following code:
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels