Loggers and Writers for Individual Services

In addition to the global logging settings, AEM allows you to configure specific settings for an individual service:

the specific logging level

the location of the individual log file

the number of versions to be kept

version rotation; either maximum size or the time interval

the format to be used when writing the log messages

the logger (the OSGi service supplying the log messages)

This allows you to channel log messages for a single service into a separate file. This can be particularly useful during development or testing; for example, when you need an increased log level for a specific service.

AEM uses the following to write log messages to file:

An OSGi service (logger) writes a log message.

A Logging Logger takes this message and formats it according to your specification.

A Logging Writer writes all these messages to the physical file that you have defined.

These elements are linked by the following parameters for the appropriate elements:

Log File (Logging Logger)
Define the physical file for storing the log messages.
This is used to link a Logging Logger with a Logging Writer. The value must be identical to the same parameter in the Logging Writer configuration for the connection to be made.

Log File (Logging Writer)
Define the physical file that the log messages will be written to.
This must be identical to the same parameter in the Logging Writer configuration, or the match will not be made. If there is no match then an implicit Writer will be created with default configuration (daily log rotation).

Standard Loggers and Writers

Certain Loggers and Writers are included in a standard AEM installation.

The first is a special case as it controls both the request.log and access.log files: