Skip to main content

init

Function init 

Source
pub fn init(
    log_level: Option<&str>,
    log_file: Option<&Path>,
) -> Result<WorkerGuard, String>
Expand description

Initializes the global tracing subscriber: a JSON-formatted, non-blocking file layer (the durable “review this run later” artifact, ADR-0073) plus an ErrorLayer (so tracing_error::SpanTrace::capture() works from anywhere spans are active). Deliberately registers no console layer – ADR-0013/0014/0015’s indicatif/MultiProgress progress bars must never share stdout/stderr with a second, independent writer. Returns a WorkerGuard that must be kept alive for the whole process; dropping it early silently truncates buffered log lines.