Configuring Unica Campaign web application logging

To adjust the logging settings for the Unica Campaign web application log file (campaignweb.log), modify the campaign_log4j.xml file.

Procedure

  1. Open the campaign_log4j.xml file in a text editor.

    By default, the file is located at Campaign_home/conf/campaign_log4j.xml. If the file is not in the default location, you can find it in the location specified in the configuration property Campaign|logging|log4jconfig.

  2. Use the comments in the campaign_log4j.xml file to determine how to adjust the logging settings for campaignweb.log.
    For Example:
    • You can adjust the logging level. Options include ALL (equivalent to Debug), HIGH (Information), MEDIUM (Warnings), or LOW (Errors).
    • You can specify whether to generate one or multiple web log files (campaignweb.log.1, campaignweb.log.2, campaignweb.log.3).
    • You can change the campaignweb.log path and file name. By default, the log file is located on the Unica Campaign web application server, at Campaign_home/logs/campaignweb.log.
  3. Save the campaign_log4j.xml file.
  4. Restart the Unica Campaign web application.

    Important note to users who want to enable debug level logging to a specific user or a group of users:

    Customers can set debug level logging to a specific user or a set of users. With this feature, the analysis of the debug log is handled with ease as it creates a separate log file for the particular user and it does not impact the system performance of the remaining users.

    To enable this feature, users may have to adjust the logging settings of the Unica Campaign web application log file, by modifying the campaign_log4j.xml file. By default, the logging properties are loaded from the campaign_log4j.xml file. However, with this feature users can also configure the Unica Campaign web application logging properties by providing them in an XML file format.

    By default, Unica Campaign installation would generate campaign_log4j.xml file at ./Affinium/Campaign/conf location which would have the Unica Campaign logging properties in an XML format.

    Loading of the XML file or the properties file is configurable and can be changed in the Unica Campaign web application under the Configuration settings. To access these properties, choose Settings > Configuration

    log4jConfig
    Campaign | logging
    Description

    The log4jConfig property specifies the location of the Unica Campaign log properties file, campaign_log4j.xml. Specify the path relative to the Unica Campaign home directory, including the file name. Use forward slashes (/)for UNIX and backslashes (\) for Windows.

    Default value
    ./conf/campaign_log4j.xml
    Perform the following steps to configure the Campaign_log4j.xml file:
    1. Log in to Unica Campaign web application with an administrator user role.
    2. Navigate to Configuration.
    3. Navigate to Affinium>Campaign> logging location.
    4. Edit log4jConfig property which saves location of logging configuration file and provide correct path of XML format logging properties file.
    5. Click Save Changes.
    6. Restart the Unica Campaign web application.
    Perform the following steps to configure the Unica Campaign web application in the Campaign_log4j.xml file:
    1. Locate the file specified by the applications>Campaign>logging> property. By default, the file would be at the following location at Campaign_home/conf/campaign_log4j.xml.
    2. Use the comments that are specified within this file to change the web application logging settings.
    3. Save the file and restart the Unica Campaign web application to change the file name and the location of the Unica Campaign web application log.
      Note: To complete this task, you must have appropriate permissions to use Marketing Platform. For information, see the Unica Platform Administrator's Guide.
    4. If customer needs user specific logging, then remove the following comments from the XML configuration file and restart the server.
      <!--<appender name="USER_FILE" class="org.apache.log4j.RollingFileAppender">
        <param name="Encoding" value="UTF-8"/>
        <param name="File" value="user_campaignweb.log"/>
        <param name="MaxBackupIndex" value="50"/>
        <param name="MaxFileSize" value="10000KB"/>
        <param name="Threshold" value="DEBUG"/>
        <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%d{MM/dd/yyyy HH:mm:ss} %-5p %c{2} [%L] - %m%n"/>
        </layout>
        <filter class="com.unica.manager.logger.UserMatchFilter">
          <param name="stringToMatch" value="asm_admin"/>
        </filter>
      </appender> -->
      <!-- <appender-ref ref="USER_FILE" /> -->

      You can add multiple tags in the Campaign_HOME/conf/campaign_log4j.xml file to create per user log files. For each new entry, a new appender must also be added. By default, with this appender tag, the campaign web log is created in the application profile home location with name user_campaignweb.log. You can specify any valid name and path for the campaign web log file. For filtered and non-filtered users, the default logs like campaignweb.log, Engage_ETL.log, UBX.log, are also created in the application profile home location. You must specify the absolute/complete paths to generate all the log files in respective folders.