Papercut Syslog

From SWKLS WIKI
Revision as of 19:15, 16 May 2022 by Sandrews (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.