Adding logs for campaign-related actions

You can add Loggers to the log4j2.xml configuration file to define which data is logged and how much detail is provided. Appenders allow you to specify where the output is directed.

The log4j2.xml file is located in your Tomcat installation here: /apache-tomcat/webapps/magnoliaAuthor/WEB-INF/config/default/log4j2.xml. Follow the steps below to configure the logs for campaign-related actions.

  1. Add the Logger entry below.

    Logger
    ...
    <Logger name="info.magnolia.campaignpublisher" level="INFO" additivity="true">
      <AppenderRef ref="log-campaigns"/>
    </Logger>
    ...
  2. Add the following appenders to your configuration file to specify magnolia-campaigns.log as the output filename in the Magnolia logs folder of your installation.

    Appenders
    ...
    <RollingFile name="sync-log-campaigns"
                 fileName="${magnolia.logs.dir}/magnolia-campaigns.log"
                 filePattern="${magnolia.logs.dir}/magnolia-campaigns-%i.log"
                 append="true">
      <PatternLayout pattern="%-5p %c %d{dd.MM.yyyy HH:mm:ss} -- %encode{%m}{CRLF}%n"/>
      <ThresholdFilter level="INFO"/>
      <Policies>
        <SizeBasedTriggeringPolicy size="1MB"/>
      </Policies>
      <DefaultRolloverStrategy max="5"/>
    </RollingFile>
    <Async name="log-campaigns">
      <AppenderRef ref="sync-log-campaigns"/>
    </Async>
    ...
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules