pub trait Logger {
    type LogRecord: LogRecord;

    // Required methods
    fn create_log_record(&self) -> Self::LogRecord;
    fn emit(&self, record: Self::LogRecord);
}
Expand description

The interface for emitting LogRecords.

Required Associated Types§

Source

type LogRecord: LogRecord

Specifies the LogRecord type associated with this logger.

Required Methods§

Source

fn create_log_record(&self) -> Self::LogRecord

Creates a new log record builder.

Source

fn emit(&self, record: Self::LogRecord)

Emit a LogRecord. If there is active current thread’s Context, the logger will set the record’s TraceContext to the active trace context,

Implementations on Foreign Types§

Source§

impl Logger for Logger

Source§

fn emit(&self, record: <Logger as Logger>::LogRecord)

Emit a LogRecord.

Source§

type LogRecord = LogRecord

Source§

fn create_log_record(&self) -> <Logger as Logger>::LogRecord

Implementors§