[][src]Function belog::try_init

pub fn try_init() -> Result<(), SetLoggerError>

Tries to initialize the logger with the default level, which is set to Info.

Example

belog::try_init().expect("Failed to initialize logger.");

info!("Some info here");
error!("An error occurred");