Jump to: navigation, search

Adjust the Log File Roll and Retention 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 (CCAdv) Web services
  • CCAdv XML Generator
  • Workforce Advisor (WA) server and Web services
  • Frontline Advisor (FA)
  • Advisors Genesys Adapter (AGA)

Starting in release 8.5.001, 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 Modules Running in the Geronimo Application Server, Contact Center Advisor XML Generator, Frontline Advisor, 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.


    Modules Running in the Geronimo Application 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 geronimo-tomcat6-minimal-2.2.1\var\log subdirectory.
    2. Edit the server-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 Geronimo 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.

    Frontline Advisor

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

    1. Navigate to your base Advisors directory, and then to the conf subdirectory.
    2. Edit the FrontlineAdvisor-log4j.properties 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.
This page was last edited on August 25, 2014, at 19:16.
Comments or questions about this documentation? Contact us for support!