Skip to main content

LogSink

Trait LogSink 

Source
pub trait LogSink: Send + Sync {
    // Required method
    fn emit(&self, event: &LogEvent) -> Result<(), LogError>;

    // Provided methods
    fn accepts_sensitive(&self) -> bool { ... }
    fn name(&self) -> &'static str { ... }
}
Expand description

A destination receiving a sanitized event from crate::LogDispatcher.

Required Methods§

Source

fn emit(&self, event: &LogEvent) -> Result<(), LogError>

Writes one event or reports a controlled failure.

Provided Methods§

Source

fn accepts_sensitive(&self) -> bool

Reports whether this sink is an explicitly encrypted sensitive boundary.

Ordinary sinks deliberately retain the default false, so a sensitive policy can never disclose an event to stdout, JSONL or memory by mistake.

Source

fn name(&self) -> &'static str

Stable bounded metric label for this sink implementation.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§