Skip to main content

emit_error

Function emit_error 

Source
pub fn emit_error(localized_msg: &str)
Expand description

Emits a localised error message to stderr via the tracing subscriber.

ADR-0047 / BUG-12 v1.0.88: prior implementation also called eprintln! which produced a SECOND stderr line (Error:/Erro: prefix) for the same error, on top of the structured tracing::error! line. Operators and log parsers observed duplicated stderr lines.

The tracing subscriber is configured for stderr at main.rs:115, so a single tracing::error! call already produces the human-readable line. Callers that want a plain stderr line without tracing (e.g. one-shot scripts) should use eprintln! directly instead of this helper.

Centralises human-readable error output following Pattern 5 (output.rs is the SOLE I/O point of the CLI).