Papercut Syslog

From SWKLS WIKI
Revision as of 19:15, 16 May 2022 by Unknown user (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.