Jump to: navigation, search

Adjust Logging Settings

To limit the disk space consumed by log information, some Advisor components manage both the size and the number of their log files. These components will roll each of their current log files to backup copies both at the beginning of each day, and after the size of the log file reaches a threshold. You can do this for:

  • Platform log of authorizations, which records users logging in to and out of Advisors
  • Administration module log, which records many actions carried out in the module
  • Contact Center Advisor, Workforce Advisor, and Frontline Advisor Web services running in Tomcat
  • Contact Center Advisor (CCAdv) XML Generator
  • Advisors Genesys Adapter (AGA)

The default setting for rollover of the log files is daily or when the log file size exceeds 10 MB.

See also Configuring the Audit Logs for more information.

Configuring Rollover of the Log File

Starting in release 8.5.001, you can configure the log4j.xml and the log4j.properties files to use a rolling filename in this format: <Component><Date><Time>.log. <Date> and <Time> are configurable parameters. The appropriate component name is automatically added to the log filename.

The following are the rolling attributes for a log file:

  • datePattern—Specifies the schedule on which the log file rolls over (closes the log file, renames it to a rolling file, and starts a new file). You can set the schedule so the log file rolls over by year, month, day, half day, hour, and minute. See DatePattern Conventions for more information.
  • maxFileSize—Sets the size threshold past which the log file rolls over. Specify an integer value, along with either KB, MB, or GB (for example, 10MB for ten megabytes).
    MaxFileSize does not set a hard limit on the maximum size for the associated log file, but rather represents a threshold past which the log file is subject to rolling. The actual size of a log file will depend upon system load and the volume of log entries.
  • suffixPattern—Specifies the suffix for the log's filename when the log file rolls over. The parameter supports Java's SimpleDateFormat conventions, such as '.'yyyy-MM-dd_HH-mm-ss'.log'. The literal text must be escaped within a pair of single quotes.
  • MaxRollFileCount—Sets the number of backup log files to keep.
  • ScavengeInterval—An interval in milliseconds. On this schedule, log4j checks to see if it should delete backed-up log files because there are more than MaxRollFileCount files. If you set ScavengeInterval to -1, MaxRollFileCount will be ignored, and all backup copies will be retained. You will need to manually clear the backup copies from the log directory on a periodic basis.

See Advisors Platform Server, Contact Center Advisor XML Generator, and Advisors Genesys Adapter for procedures to configure log filenames and additional log file attributes.

DatePattern Conventions

You can specify the schedule on which the log file rolls over to a new file using the DatePattern parameter. The parameter uses Java's SimpleDateFormat conventions. The Table below shows the possible entries to specify for the DatePattern parameter.

DatePattern Rollover Schedule
yyyy-MM Rollover at the beginning of each month.
yyyy-ww Rollover on the first day of each week. The first day of the week depends on the locale.
yyyy-MM-dd Rollover at midnight each day.
yyyy-MM-dd-a Rollover at midnight and midday of each day.
yyyy-MM-dd-HH Rollover at the top of every hour.
yyyy-MM-dd-HH-mm Rollover at the beginning of every minute.

For example, if you set the File option to /xxx/yyy.log, you set the DatePattern to yyyy-MM-dd, and you set the SuffixPattern to '.'yyyy-MM-dd, the logging file /xxx/yyy.log is copied to /xxx/yyy.log.2014-02-16 on 2014-02-16 at midnight and logging for 2014-02-17 continues in the /xxx/yyy.log file until it rolls over the next day, and so on.

Advisors Platform Server

You can adjust the size threshold, as well as the number of backup copies retained, by editing the properties in the logging properties file. Use the following procedure.

1. Navigate to your base Advisors directory, and then to the conf subdirectory.
2. Edit the log4j.properties file.
3. Look for the rolling properties and, for each log file, adjust them appropriately.

Contact Center Advisor XML Generator

CCAdv XML Generator uses a logging properties file that is different from the one used by the modules running in the Tomcat application server. Use the following procedure to make changes to the logging properties file for CCAdv XML Generator.

1. Navigate to your base Advisors directory, and then to the xmlgen subdirectory.
2. Edit the log4j.xml file.
3. Look for the rolling properties and, for each log file, adjust them appropriately.

Advisors Genesys Adapter

Use the following procedure to make changes to the logging properties file for AGA.

1. Navigate to your base AGA directory, and then to the conf subdirectory.
2. Edit the log4j.properties file.
3. Look for the rolling properties and, for each log file, adjust them appropriately.

Specifying the Log File Storage Locations

35px|link= By default, the Platform server logs are written to the following log folder:
<Advisors>\apache-tomcat-<version>\logs

To specify a different directory for the Platform server logs, see Specifying a Location for the Platform Server Log Files.

The AGA log file storage location is specified in a .properties file that is located within the AGA installation directory. Similarly, the CCAdv XML Generator log file storage location is specified in an .xml file, which is located within the XML Generator installation directory. To specify a different location for either the AGA or the CCAdv XML Generator log file, see Specifying a Location for the AGA and CCAdv XML Generator Log Files.

Specifying a Storage Location for the Platform Server Log Files

Procedure:


Steps

  1. To change the location of the advisors.log file, edit the location in the <Advisors>/conf/log4j.properties file:

    log4j.appender.FILE.file=${catalina.base}/logs/advisors.log
  2. To change the location of the auth.log file, edit the location in the <Advisors>/conf/log4j.properties file:

    log4j.appender.AUDIT.file=${catalina.base}/logs/auth.log
  3. To change the location of the AdministrationAudit.log file, edit the location in the <Advisors>/conf/log4j.properties file:

    log4j.appender.ADMINISTRATIONAUDIT.file=${catalina.base}/logs/AdministrationAudit.log
  4. To change the location of the Tomcat Access log, locate the directory entry property in the <Advisors>\apache-tomcat-<version>\conf\server.xml file, and edit the value to specify a new location.

    If you do not specify an absolute path, then the location is relative to the Tomcat base folder (apache-tomcat-<version>). For example (this is the default setting):

    <Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="logs" prefix="localhost_access_log" suffix=".txt"
    pattern="%h %l %u %t "%r" %s %b" />

Specifying a Storage Location for the AGA and CCAdv XML Generator Log Files

The default location in which to store the AGA and XML Generator log files is specified in files that reside within the installation directory of each component.

To specify a non-default location for the AGA log file, edit the following file:
<Adapter>/conf/log4j.properties

To specify a non-default location for the CCAdv XML Generator log file, edit the following file:
<XMLGen>/log4j.xml

This page was last edited on February 7, 2018, at 21:12.
Comments or questions about this documentation? Contact us for support!