pub fn init_for_test(level: LevelFilter) -> FlushGuard
Expand description
Initialize with ConsoleLogger + Console::Stdout + default_formatter.
FlushGuard must be dropped on the end of the program. Ignore errors if a logger is already set.
This function is intended to be called on test start.
cargo test -- --nocapture
option is needed to see the log.