Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It holds a reference to a LoggingStatistics instance, but it does not use it directly, this is to be used by child classes to calculate statistics about the logging calls.

LoggingStatistics

The LoggingStatistics class is utility class for calculating and storing statistics about the logs that have been processed by a specific logger. There are some configurable parameters:

  • statisticsCalculationPeriod: Time used for retrieving data before calculating statistics. Default 10 minutes.
  • statisticsGranularity: Time unit used for calculations (i.e. logs per second, logs per minute, etc.). Default 1 second.

It calculates 5 statistics:

  • messageStatistics: Number of log messages per granularity unit.
  • errorStatistics: Number of log errors per granularity unit.
  • messageIncrement: Number of log messages since last calculation.
  • errorIncrement: Number of log errors since last calculation.
  • actualStatisticsPeriod: Actual period of time which was used to gather data before calculating statistics.
    • Usually close to statisticsCalculationPeriod
    • May be different when there's a change of configuration or during the destruction of the logger

Logger

LogTrace

Logger_ptr

StopWatch

...