Skip to main content

init_logging

Function init_logging 

Source
pub fn init_logging(
    logging: &LoggingConfig,
    level: Option<LogLevel>,
) -> Result<(), String>
Expand description

Installs the [logging] configuration. Re-exported because main.rs is what calls it — see dispatch. Installs the process-wide tracing subscriber from [logging].

Every knob is validated before anything is installed, and an unknown value is an error the caller prints and exits on rather than a silent fallback — the same reasoning as [build_env_filter]: a certificate authority running at a log level or to a destination its operator did not ask for is worse than one that refuses to start and says why.