eVaf
eVaf::Common::Internal::LoggerSource Class Reference

Logger source. More...

#include <Common/logger.h>

Public Member Functions

void init (QString const &source)
 Initializes the source. More...
 
 LoggerSource ()
 
 LoggerSource (LoggerSource const &o)
 

Public Attributes

QString fileName
 File name. More...
 
uint maxCount
 Current maximum number of log files. More...
 
uint maxSize
 Current maximum size of log files. More...
 
QString name
 Name of the source. More...
 
iLogger::Severity severity
 Current severity level. More...
 

Detailed Description

Logger source.

This class stores information about known sources.

Definition at line 46 of file logger.h.

Constructor & Destructor Documentation

eVaf::Common::Internal::LoggerSource::LoggerSource ( )
eVaf::Common::Internal::LoggerSource::LoggerSource ( LoggerSource const &  o)

Member Function Documentation

void eVaf::Common::Internal::LoggerSource::init ( QString const &  source)

Initializes the source.

Parameters
sourceName of the source

This function initializes the newly created logger source and sets initial parameters for the source.

Default parameters:

  • severity is set to Fatal
  • maximum size of the log file is set to 100 KiB
  • maximum number of log files is set to 3

Default parameters can be overwritten with values read from the logger.ini file. This file should have the [.default] section with new default values for all the sources. Individual sources can have their parameters changed in sections with the name of the source.

Example logger.ini file:

[.default]
log_level = Fatal
log_size = 100
log_count = 3
[my-source]
log_level = Warning
log_size = 1000
log_count = 10

Member Data Documentation

QString eVaf::Common::Internal::LoggerSource::fileName

File name.

Definition at line 96 of file logger.h.

uint eVaf::Common::Internal::LoggerSource::maxCount

Current maximum number of log files.

Definition at line 102 of file logger.h.

uint eVaf::Common::Internal::LoggerSource::maxSize

Current maximum size of log files.

Definition at line 99 of file logger.h.

QString eVaf::Common::Internal::LoggerSource::name

Name of the source.

Definition at line 90 of file logger.h.

iLogger::Severity eVaf::Common::Internal::LoggerSource::severity

Current severity level.

Definition at line 93 of file logger.h.


The documentation for this class was generated from the following file: