pub trait LogSink: Send + Sync {
// Required methods
fn enabled(&self, level: LogLevel) -> bool;
fn log(&self, record: &LogRecord<'_>);
}Expand description
Where the log lines of a build, or of any other work, go.
A host gives a sink when it starts a Sheet, and the work
writes to it through Scope::log. The trait stands on
its own: a host may give the same sink to code that runs outside any
build.
A log line is text for a person about what the work does; a problem of the document is a diagnostic, never a log line.
The sink is called on the thread that writes the line, possibly from several threads at once, and holds that work up until it returns.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".