Struct slog_extlog::stats::StatsConfig [] [src]

pub struct StatsConfig<T> where
    T: StatisticsLogFormatter
{ pub interval_secs: Option<u64>, pub stats: Vec<StatDefinitions>, pub handle: Option<Handle>, pub stat_formatter: PhantomData<T>, }

Configuration required for tracking statistics.

This configuration should be passed to a StatisticsLogger to allow tracking metrics from logs.

Construct either with Default::default() for no stats at all, or else use a StatsConfigBuilder.

Fields

The period, in seconds, to log the generated metrics into the log stream. Defaults to 300 seconds (5 minutes). One log will be generated for each metric value. A value of None indicates stats should never be logged.

The list of statistics to track. This MUST be created using the define_stats macro.

The tokio reactor core to run the stats logging on, if the user is using tokio already. If this is None (the default), then a new core is created for logging stats.

An object that handles formatting the individual statistic values into a log.

Trait Implementations

impl<T: Debug> Debug for StatsConfig<T> where
    T: StatisticsLogFormatter
[src]

[src]

Formats the value using the given formatter. Read more

impl<F> Default for StatsConfig<F> where
    F: StatisticsLogFormatter
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<T> !Send for StatsConfig<T>

impl<T> !Sync for StatsConfig<T>