Sending Log Data to Another Location
Last modified on 11 August 2020 09:49 PM
By default the PaperCut Application Server will create all it’s log data in
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 https://logging.apache.org/log4j. The following simple example for syslog included below shows the basic process:
To configure the PaperCut server log setup update the file
1. Add a stanza for a new logging destination:
# Log to local syslog server log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender log4j.appender.SYSLOG.Threshold=INFO # See https://en.wikipedia.org/wiki/Syslog#Facility for a list of allowed values log4j.appender.SYSLOG.Facility=LOCAL3 log4j.appender.SYSLOG.syslogHost=localhost log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout 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.