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:

  • The Logger:

    • Apache Sling Customizable Request Data Logger

      (org.apache.sling.engine.impl.log.RequestLoggerService)

    • Write messages about request content to request.log.

  • Links to:

    • Apache Sling Request Logger

      (org.apache.sling.engine.impl.log.RequestLogger)

    • Writes the messages to either request.log or access.log.

These can be customized if necessary, though the standard configuration is suitable for most installations.

The other pairs follow the standard configuration:

  • The Logger:

    • Apache Sling Logging Logger Configuration

      (org.apache.sling.commons.log.LogManager.factory.config)

    • Writes Information messages to logs/error.log.

  • Links to the Writer:

    • Apache Sling Logging Writer Configuration

      (org.apache.sling.commons.log.LogManager.factory.writer)

  • The Logger:

    • Apache Sling Logging Logger Configuration
      (org.apache.sling.commons.log.LogManager.factory.config.649d51b7-6425-45c9-81e6-2697a03d6be7)

    • Writes Warning messages to ../logs/error.log for the service org.apache.pdfbox.

  • Does not link to a specific Writer so will create and use an implicit Writer with default configuration (daily log rotation).

Creating Your Own Loggers and Writers

You can define your own Logger / Writer pair:

  1. Create an instance of the Factory Configuration Apache Sling Logging Logger Configuration.

    1. Specify the Log File.
    2. Specify the Logger.
    3. Configure the other parameters as required.
  2. Create an instance of the Factory Configuration Apache Sling Logging Writer Configuration.

    1. Specify the Log File - this must match that specified for the Logger.
    2. Configure the other parameters as required.
NOTE
In certain circumstances you may want to create a custom log file.

Experience Manager


Elevate and Empower Teams with Agentic AI for Exceptional Experiences

Online | Strategy Keynote | General Audience

Elevate and empower your CX teams with AI that transforms creativity, personalization, and productivity. Discover how Adobe is...

Tue, Mar 18, 1:00 PM PDT (8:00 PM UTC)

Register

How Adobe Uses GenStudio to Supercharge Its Global Marketing Organization

In-person | Session | General Audience

Get an inside look at how Adobe’s global marketing organization is using Adobe GenStudio to build a world-class content supply chain....

Tue, Mar 18, 4:00 PM PDT (11:00 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more