Skip to main content

try_init

Function try_init 

Source
pub fn try_init() -> Result<(), ConsoleInitError>
Expand description

Try to install a global console using RUST_LOG, defaulting to info.

Uses the same output defaults as init. Returns an error if RUST_LOG cannot be read or parsed, or a global subscriber is already installed. The process’s log logger is left unchanged.