Skip to end of metadata
Go to start of metadata

Scope

  • For general information about JobScheduler Master and Agent logging see What logging possibilities does JobScheduler provide?
  • This article is focused on log configuration settings that are applied in some typical scenarios, log rotation and compression.
  • Detailed information on log configuration is available from Apache Log4j.
  • Modifications of the log configuration are applied with the configuration file $SCHEDULER_HOME/lib/log4j.xml

Log Rotation

Rotating the log depending on a period

Rotating the log depending on a period  Expand source

 

The entry <param name="DatePattern" value="'.'yyyy-MM-dd"/>  specifies the rotation frequency:

FrequencyConfiguration Sample
Rotate every minute<param name="DatePattern" value="'.'yyyy-MM-dd-hhmm" />
Rotate every hour<param name="DatePattern" value="'.'yyyy-MM-dd-hh" />
Rotate every day<param name="DatePattern" value="'.'yyyy-MM-dd"/>

Rotating the log depending on the size

Rotating the log depending on the size  Expand source

 

This will create a new file .log.n (n=1..5) when the size exceeds 2KB. You also can specify 20MB etc. The maximum value for n is 13.

Log Rotation and Compression

If you want to compress the rotated logs, please check the $SCHEDULER_HOME/lib/log/log4j folder for availability of the file apache-log4j-extras-1.2.xx.jar.
It should be provided with SET-62 - Job Scheduler Agent should have apache-log4j-extras-1.2.xx.jar in the classpath Released
Should this file not be available then download it from https://logging.apache.org/log4j/extras/download.html

Rotating and compressing the log depending on a period

Rotating and compressing the log depending on a period  Expand source

 

The entry <param name="FileNamePattern" value="${LOGFILE}.%d{yyyyMMdd-hh}.log" />  specifies the rotation frequency:

FrequencyConfiguration Sample
Rotate every minute<param name="FileNamePattern" value="${LOGFILE}.%d{yyyyMMdd-hhmm}.log" />
Rotate every hour<param name="FileNamePattern" value="${LOGFILE}.%d{yyyyMMdd-hh}.log" />
Rotate every day<param name="FileNamePattern" value="${LOGFILE}.%d{yyyyMMdd}.log" />

Rotating and compressing the log depending on the size

Rotating and compressing the log depending on the size  Expand source

 

This will create a new file .n.log (n=1..5) whenever the size exceeds 20KB. You also can specify 20MB etc. The max value for n ist 13.