pub trait StatisticsLogFormatter: Sync + Send + 'static {
    // Required method
    fn log_stat(logger: &StatisticsLogger, stat: &StatLogData<'_>)
       where Self: Sized;
}
Expand description

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

Required Methods§

source

fn log_stat(logger: &StatisticsLogger, 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.

Implementors§