log
Module: log
Section titled “Module: log”Contents
Section titled “Contents”Structs
ForegroundLog- Handle to the swappable foreground log surface.ForegroundState- Shared, runtime-swappable destination for the foreground compact layer.
firma_run::log::ForegroundLog
Section titled “firma_run::log::ForegroundLog”Struct
Handle to the swappable foreground log surface.
firma run uses it to redirect its foreground output into a per-run
directory while the wrapped agent’s TUI owns the terminal, then restore it
to stderr for teardown. In file mode (--log-file) the handle is inert:
stderr is never written, so [ForegroundLog::redirect] and
[ForegroundLog::restore] do nothing.
Tuple Struct: ()
Methods:
fn active() -> Self- Handle over a live stderr surface whose sink can be swapped.fn idle() -> Self- Inert handle for file mode, where there is no foreground surface.fn state(self: &Self) -> Arc<ForegroundState>- Shared state, for wiring into atracinglayer’s writer and formatter.fn redirect(self: &Self, dir: &Path)- Redirect the foreground log surface to<dir>/run.logso the wrappedfn restore(self: &Self)- Restore the foreground log surface to stderr.
Trait Implementations:
- Clone
fn clone(self: &Self) -> ForegroundLog
firma_run::log::ForegroundState
Section titled “firma_run::log::ForegroundState”Struct
Shared, runtime-swappable destination for the foreground compact layer.
Methods:
fn is_stderr(self: &Self) -> bool- Whether the foreground currently targets stderr (used to gate ANSIfn is_disabled(self: &Self) -> bool- Whether the destination is disabled (file mode); redirect/restore dofn write(self: &Self, buf: &[u8]) -> io::Result<usize>- Write one buffer to the active destination, resolved lazily so afn flush(self: &Self) -> io::Result<()>- Flush the active destination.