Skip to main content

log_init_with_format

Function log_init_with_format 

Source
pub fn log_init_with_format(
    level: u8,
    path: Option<&Path>,
    format: LogFormat,
) -> Status
Expand description

Install the global tracing subscriber with a chosen output shape.

See LogFormat for the supported values. The default value (LogFormat::Default) is byte-identical to what log_init installs, so passing it here is equivalent to the original two-argument call.

ยงExamples

use dynomite::core::log::{log_init_with_format, LogFormat, LOG_NOTICE};
log_init_with_format(LOG_NOTICE, None, LogFormat::Json).expect("install logger");