[][src]Trait slog_extlog::stats::StatisticsLogFormatter

pub trait StatisticsLogFormatter {
    fn log_stat(logger: &StatisticsLogger<Self>, stat: &StatLogData<'_>)
    where
        Self: Sized
; }

A trait object to allow users to customise the format of stats when logged.

Required methods

fn log_stat(logger: &StatisticsLogger<Self>, stat: &StatLogData<'_>) where
    Self: Sized

The formatting callback. This should take the statistic information and log it through the provided logger in the relevant format.

The DefaultStatisticsLogFormatter provides a basic format, or users can override the format of the generated logs by providing an object that implements this trait in the StatsConfig.

Loading content...

Implementors

impl StatisticsLogFormatter for DefaultStatisticsLogFormatter[src]

fn log_stat(logger: &StatisticsLogger<Self>, stat: &StatLogData<'_>) where
    Self: Sized
[src]

The formatting callback. This default implementation just logs each field.

Loading content...