Configure Log4j for Bloomreach Cloud

This documentation applies to Bloomreach Cloud 2 only

Introduction

Goal

Configure Log4j in your Bloomreach Experience Manager project for deployment in Bloomreach Cloud.

Background

Bloomreach Cloud supports Log4j version 2.x. The logs are exposed at Humio. Account details are provided by Bloomreach.

The Bloomreach Cloud platform captures the following output:

  • audit.log
  • cms.log  
  • site.log
  • catalina std out

Log4j Configuration

Bloomreach Experience Manager projects created using a recent Bloomreach Experience Manager Maven archetype already have Log4j configured out-of-the-box.

Make sure the log4j configuration file is named log4j2.xml.

If your project was created using an older version of the archetype and subsequently upgraded, or if your project was not created using the archetype at all, make sure your Log4j configuration looks similar to:

    <!-- cms.log -->
    <RollingFile name="cms" fileName="${sys:catalina.base}/logs/cms.log"
                 filePattern="${sys:catalina.base}/logs/cms.log.%d{yyyy-MM-dd}">
      <LookupFilter key="jndi:logging/contextName" value="cms" onMatch="ACCEPT"/>
      <PatternLayout pattern="%d{dd.MM.yyyy HH:mm:ss} %-5p [%C.%M():%L] %m%n"/>
      <Policies>
        <TimeBasedTriggeringPolicy/>
      </Policies>
    </RollingFile>

 

Do not output your log messages to standard output or standard error, otherwise they will not end up in the Humio logs.
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?

    We rely on cookies

    to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

    Manage cookies
    Accept & close

    Cookies preferences

    Accept & close
    Back