3.3. Logger configuration

The logger configuration is defined in the Logging section. The logger is defined for different backends. We can define several backends for the logger.

3.3.1. Log message types and log levels

Each backend defines the level (verbosity) of logging. For the log levels we use the type of the log message. The types of log messages can be listed in ascending order of their severity. Setting the log level to a type of log message means that the system logs all messages with equal or higher severity than the specified type. The log message types are listed in the following table. They are listed in ascending order of severity:

Table 3.7. Log message types

NameDescription
DATA2Processing data messages, not truncated
DATAProcessing data messages with big chunks truncated
TRACEProcessing trace messages
DEBUGDebug messages
INFOInformation messages
NOTICEImportant information messages
WARNINGWarning messages
ERRORProcessing error messages
SEVERESevere errors that should be analyzed.
CRITICALCritical errors that have to notified.
ALERTCritical errors that have to be escalated to a person responsible immediately.
FATALFatal errors that cause the server to shut down.


3.3.2. Log backends

In the following sub sections we list the different backends and how they can be configured.

Backend console

For defining the backend to log to console (stderr), we have to configure a subsection stderr of the Logging section. For console logging we just can define the logging level with level. Example configuration:

Logging
{
    Stderr {
        Level INFO
    }
}

Backend logfile

For defining the backend to log to a file, we have to configure a subsection LogFile of the Logging section. For logging to file we can define the logging level with Level and the file name with Filename. Example configuration:

Logging
{
    LogFile {
        Filename /var/log/wolframed.log
        Level NOTICE
    }
}

Backend syslog

For defining the backend to log to syslog, we have to configure a subsection Syslog of the Logging section. For logging to syslog we can define the logging level with Level, the syslog facility with Facility and the identifier with Ident. Example configuration:

Logging
{
    Syslog {
        Ident wolframed
        Facility LOCAL2
        Level INFO
    }
}

Backend eventlog

On Windows we can also log to eventlog. For defining the backend to log to eventlog, we have to configure a subsection Eventlog of the Logging section. For logging to eventlog we can define the logging level with Level, the eventlog source with Source and the identifier with Name. Example configuration:

Logging
{
    Eventlog {
        Name Wolframe
        Source wolframed
        Level WARNING
    }
}