stats-file-logger

This allows configuring of statistics gathering to an external file. This only has one class, and may be controlled independently from the internal statistics.

stats {
    'stats-file-logger' (class: tigase.stats.CounterDataFileLogger) {
        <other settings>
    }
}
frequency

stats-file-logger may also be controlled using frequency, which is the time interval between executions of the archiver .execute() method in seconds.

stats {
    'stats-file-logger' (class: tigase.stats.CounterDataFileLogger) {
        frequency = '60'
    }
}
file configuration

You can customize the file output for stats-file-logger using the following setting options, these are all optional.

stats {
    'stats-history-size' = '2160'
    'stats-update-interval' = '10'
    'stats-file-logger' (class: tigase.stats.CounterDataFileLogger) {
        frequency = '60'
        'stats-datetime' = 'true'
        'stats-datetime-format' = 'HH:mm:ss'
        'stats-directory' = 'logs/server_statistics'
        'stats-filename' = 'stat'
        'stats-level' = 'FINEST'
        'stats-unixtime' = 'false'
  • 'stats-datetime' - Whether to include date & time timestamp.
  • 'stats-datetime-format' - Specifies the formatting of datetime timestamp.
  • 'stats-directory' - The directory to which the statistics file should be saved.
  • 'stats-filename' - The filename prefix to name the output statistics file.
  • 'stats-level' - Sets the level of statistics to be gathered.
  • 'stats-unixtime' - Control the format of the timestamp to use java DateFormat pattern.

which configures accordingly: directory to which files should be saved, filename prefix, whether to include or not unix timestamp in filename, whether to include or not datetime timestamp, control format of timestamp (using java DateFormat pattern) and also set level of the statistics we want to save (using java Logger.Level)