LokiFormatter

Trait LokiFormatter 

Source
pub trait LokiFormatter: Send + Sync {
    // Required method
    fn write_record(&self, dst: &mut String, rec: &Record<'_>) -> Result;
}
Expand description

LokiFormatter implementations marshals a log record to a string. This trait can be implemented to customize the format of the strings that get sent to Loki. By default, this crate provides a logfmt LokiFormatter implementation, which is used by default.

Required Methods§

Source

fn write_record(&self, dst: &mut String, rec: &Record<'_>) -> Result

Implementors§