The logger configuration is defined in the Logging
section. The logger is defined for different backends.
We can define several backends for the logger.
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
Name | Description |
---|---|
DATA2 | Processing data messages, not truncated |
DATA | Processing data messages with big chunks truncated |
TRACE | Processing trace messages |
DEBUG | Debug messages |
INFO | Information messages |
NOTICE | Important information messages |
WARNING | Warning messages |
ERROR | Processing error messages |
SEVERE | Severe errors that should be analyzed. |
CRITICAL | Critical errors that have to notified. |
ALERT | Critical errors that have to be escalated to a person responsible immediately. |
FATAL | Fatal errors that cause the server to shut down. |
In the following sub sections we list the different backends and how they can be configured.
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 } }
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 } }
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 } }
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 } }
Copyright © 2014 - Project Wolframe - All Rights Reserved