hyperlane-plugin-logger 22.14.1

A logging plugin for the Hyperlane framework, writing the log of a server to the console, to a file, or to both.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

/// Pluggable output sink receiving formatted log records from [`LoggerPlugin`].
pub trait LogSink: Send + Sync + 'static {
    /// Receives one sanitized, formatted log line.
    ///
    /// # Arguments
    ///
    /// - `LevelFilter` - Log severity level of the record.
    /// - `&str` - Formatted single-line log payload.
    fn write_record(&self, level: LevelFilter, line: &str);

    /// Flushes any buffered records held by this sink.
    fn flush(&self) {}
}