Changing Application Server Log Rotation

KB Home   |   Changing Application Server Log Rotation

By default the PaperCut Application Server keeps up to 2048MB of log files (40 files of 50MB in size).

When debug logging is enabled on sites with a large volume of printing or a heavy use of hold release queues they may find that the logs rotate very quickly (e.g. in less than 20 minutes). This can cause problems when PaperCut support is trying to help diagnose problems because the logs rotate too quickly, meaning the important data is rotated/deleted before it can be captured.

It is simple to change the amount of logging retained by PaperCut. Please choose the instructions for your version of PaperCut.

PaperCut 14.3 (or later)

Changing server log rotation for with debug enabled

1. Login to the PaperCut administration interface

2. Navigate to “Options→Advanced”.

3. In the diagnostics section, check Enable debug mode and increase the amount of logs to keep from the default of 2048MB to something suitable for your site. e.g. 5000MB

NOTE: In most cases 2048MB is enough for diagnostics. Make sure you have enough disk space to store the increased amount of logs.

3. Press “Apply” to save the settings. These changes take effect immediately (no restart required).

Changing server log rotation without enabling debug

1. Login to the PaperCut administration interface

2. Navigate to “Options→Advanced”.

3. Open the Config Editor and search for “system.log.default.keep-mb”. Change the value from the default 100 to something suitable for your site. e.g 500.

NOTE: Make sure you have enough disk space to store the increased amount of logs.

4. Press “Update” to save the settings. These changes take effect immediately (no restart required).

PaperCut 13.2 - 14.2

1. Login to the PaperCut administration interface

2. Navigate to “Options→Advanced”.

3. In the diagnostics section, increase the amount of logs to keep from the default of 100MB to something suitable for your site. e.g. 500MB

NOTE: Make sure you have enough disk space to store the increased amount of logs.

3. Press “Apply” to save the settings. These changes take effect immediately (no restart required).

How does PaperCut know how many logs to create

If the total size of logs is less than 500MB you will have 10 logs of a maximum size of 50MB.

If the total size of logs is more than 500MB you will have 50MB logs up to the maximum configured size.

PaperCut 13.1 (or earlier)

1. Using a text editor, open the logging configuration file: [app-path]\server\lib\log4j.properties

2. Locate the lines in the file that look like the following:

   log4j.appender.file.MaxFileSize=10MB
   log4j.appender.file.MaxBackupIndex=10

3. These settings determine the size of each log file, and the number of log files to keep. The settings above will keep 100MB of logs (10 x 10MB files). Change this setting to increase the amount of logs kept. To keep up to 1GB of logs you could change the MaxFileSize setting to 100MB, or alternatively change you could change MaxBackupIndex index to retain more logs.

NOTE: Make sure you have enough disk space to store the increased amount of logs.

3. Save the text file

4. Restart the PaperCut Application Server service (On Windows do this in Control Panel→Admin Tools→Services).

After the restart your PaperCut application server will collect more log data.

NOTE: These settings will be reset back to the defaults after PaperCut upgrades.

Categories: Debugging


Keywords: log, rotate, logs, debug, delete, extend, roll

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on March 17, 2016, at 10:32 AM
Printable View   |   Article History   |   Edit Article