Skip to main content

LogSink

Type Alias LogSink 

Source
pub type LogSink = Arc<dyn Fn(&str, &str, &str) + Send + Sync>;
Expand description

Host log callback. Called for every log host import the guest invokes (after the log capability gate). Arguments: severity tag ("debug" | "info" | "warn" | "error"), plugin name, message.

When unset, the runtime falls back to eprintln! — fine for headless / CLI use, but the TUI MUST install a sink that routes to its event channel; otherwise plugin log writes clobber the alt-screen.

Aliased Type§

pub struct LogSink { /* private fields */ }