Skip to main content

install_global_subscriber

Function install_global_subscriber 

Source
pub fn install_global_subscriber(
    recording_override: Option<&str>,
    default_filter: &str,
    verbose: bool,
)
Expand description

Install the global tracing subscriber. Two independent axes:

  • Recording floor — what reaches the LogCaptureLayer (and thus the JSONL writer, broadcast hook, and Observer bridge). Resolved as: recording_override (the --log-level flag) if Some, else RUST_LOG from the environment, else default_filter.

  • Terminal display — the stderr fmt layer. Gated entirely by verbose: when false the fmt layer is muted (no log lines ever reach the terminal; direct println!/stdout is untouched). When true it surfaces events down to the same recording floor.

All filter strings are RUST_LOG-compatible directives (e.g. "info" or "debug,matrix_sdk=warn").

Both axes are fixed for the process lifetime — the global subscriber is installed once and cannot be reconfigured without a restart.

Panics on subscriber install failure — the daemon cannot operate without logging.