Sending Log Data to Another Location

By default the PaperCut Application Server will create all it’s log data in [app dir]/server/logs/server.log. However sometimes you need to have the logs go to a different place, for example a centralised enterprise logging service such as syslog. PaperCut uses a sophisticated logging facility build around the standard log4j library. This article provides a simple example of how to re-configure PaperCut to log to the syslog facility simply by re-configuring log4j.

PaperCut uses the log4j library to generate most of its log messages. This means that you can re-configure the logger to put the data in a different location or push it to a logging service by using a different log4j appender. A detailed discussion of how to do this correctly is beyond the scope of this article as it will vary depending on the customer requirements and site specifics. Please refer to the Apacher log4j documention at The following simple example for syslog included below shows the basic process:

Special Notes

  • After each PaperCut application server upgrade these log4j settings are reset to the original defaults.
  • PaperCut strongly recommend backing up your log configuration file before and after making any changes. NB These should archived outside the PaperCut install directory as the files are overwritten during the PaperCut upgrade process
  • PaperCut, particularly in debug mode, can produce a lot of logging of data and you should consider this when configuring the logs
  • The PaperCut print provider logs located on the PaperCut secondary servers cannot be relocated or redirected.

To configure the PaperCut server log setup update the file [app dir]/server/lib/ to create a new logging configuration. For example.

1. Add a stanza for a new logging destination:

# Log to local syslog server

# See for a list of allowed values

log4j.appender.SYSLOG.layout.ConversionPattern=[%-5p] %c - %m%n # Customise to suit

2. Then update the list of active loggers

# Logs to file and syslog
log4j.rootLogger=error, file, SYSLOG

Now restart the PaperCut application server.

It is suggested that PaperCut continues to log to it’s default file for troubleshooting purposes, even if a remote logging service is configured as well. This will make it easier to supply PaperCut support with logs when troubleshooting.

Categories: How-to Articles, Logs

Keywords: logs, logs