Papercut Syslog

From SWKLS WIKI
Jump to navigation Jump to search

Generic example for logging to remote syslog from papercut server. Edit / append log4j2.properties file and restart Papercut Application Server service.

# Add the syslog appender
rootLogger.appenderRef.syslog.ref = syslog

appender.syslog.type = syslog
appender.syslog.name = syslog
appender.syslog.facility = LOCAL3
appender.syslog.host = localhost
appender.syslog.port = 514
appender.syslog.protocol = UDP

# Used to filter the level of log messages
appender.syslog.filter.threshold.type = ThresholdFilter
appender.syslog.filter.threshold.level = debug

# This is a ConversionPattern equivalent
# There are also other ways that the logging output can be formatted, outlined in the docs
appender.syslog.layout.type = PatternLayout
appender.syslog.layout.pattern = [%-5p] %c - %m%n  # Customise to suit

You will want to update the "appender.syslog.host" and "appender.syslog.layout.pattern" values to match your environment.