Skip to main content

try_init_logger

Function try_init_logger 

Source
pub fn try_init_logger() -> Result<(), SetLoggerError>
Expand description

Try to initialize the logger without panicking.

Reads the log level from the RUST_LOG environment variable. If not set, defaults to info level.

ยงErrors

Returns an error if the logger has already been initialized.