Skip to content

ForegroundState

Functions

  • is_stderr - Whether the foreground currently targets stderr (used to gate ANSI
  • write - Write one buffer to the active destination, resolved lazily so a

firma_run::log::ForegroundState::is_stderr

Section titled “firma_run::log::ForegroundState::is_stderr”

Function

Whether the foreground currently targets stderr (used to gate ANSI color so redirected file output stays plain).

fn is_stderr(self: &Self) -> bool

Function

Write one buffer to the active destination, resolved lazily so a concurrent redirect/restore takes effect on the next event.

Returns an error if the destination lock is poisoned or the underlying sink write fails.

fn write(self: &Self, buf: &[u8]) -> io::Result<usize>