[][src]Function belog::try_init_with_level

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

Tries to initialize the logger with the given level.

Example

belog::try_init_with_level(log::Level::Debug).expect("Failed to initialize logger.");

info!("Some info here");
trace!("Some trace message here");