IBM Support

How to prevent log files from being overwritten when attempting to capture an intermittent problem.

Question & Answer


When a problem is intermittent it may be necessary to increase the amount of data stored in trace logs to avoid overwriting the information being captured by circular logs. How can the number and size of log files be increased in both log4j and JUL logging (5.5.6 and later)?


By default the Content Engine uses a RollingFileAppender which creates a new log file once the current log reaches 100MB. Both the number and size of the log files can be changed by adding JVM arguments to the application server where Content Engine is deployed as follows:

1. The default maximum number of log files is 5. When the 5th log reaches 100MB the first log is deleted and a new one created.

To change the maximum number of log files use the -DMaxRollingFileBackups JVM argument.

For example, to specify 10 log files you would use the JVM argument: -DMaxRollingFileBackups=10
To keep the log file to only 1 you would use the JVM argument:

2. The default log size value is 100MB.

To change the size of the log file use the -DMaxRollingFileSize JVM argument. The MaxRollingFileSize option takes a value in the range 0 - 2^63. You can specify the value with the suffixes "KB", "MB" or "GB".

For example, to specify 500 MB log files you would use -DMaxRollingFileSize=500MB.

Make sure there is sufficient disk space available to store the increased number and size of log files before making these changes.

[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSNVNV","label":"FileNet Content Manager"},"ARM Category":[{"code":"a8m0z000000cvUiAAI","label":"Content Engine-\u003ELogging"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"All Version(s)"}]

Document Information

Modified date:
23 October 2023