Skip to main content

init

Function init 

Source
pub fn init()
Expand description

Install a global console using RUST_LOG, defaulting to info.

Output goes to stderr: terminal text with colour when attached to a terminal, otherwise newline-delimited JSON. The process’s log logger is left unchanged. Libraries should leave installation to their application. Use try_init to handle setup errors.

§Panics

Panics if RUST_LOG cannot be read or parsed, or a global subscriber is already installed.