Skip to main content

emit

Function emit 

Source
pub fn emit(lvl: Level, msg: &str)
Expand description

Emit msg at lvl through the active LogSink. Production path: the default sink writes to stderr; the TUI’s CapturedSink buffers for in-frame display; the level gate suppresses below the configured threshold.

A thread-local capture (installed by [_test_capture_warns]) shadows the active sink and bypasses the level gate for the calling thread — tests assert that a warn fires, not whether the runtime gate happens to be open. Mirrors the existing always-fire semantics of emit_error.