[][src]Function simple_logger::init_with_level

pub fn init_with_level(level: Level) -> Result<(), SetLoggerError>

Initializes the global logger with a SimpleLogger instance with max_log_level set to a specific log level.

simple_logger::init_with_level(log::Level::Warn).unwrap();

warn!("This is an example message.");
info!("This message will not be logged.");