Papercut Syslog: Difference between revisions

From SWKLS WIKI
Jump to navigation Jump to search
(Created page with "Generic example for logging to remote syslog from papercut server. Edit / append log4j2.properties file and restart Papercut Application Server service. <syntaxhighlight lang...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 28: Line 28:




 
[[Category:PaperCut]]
[[Category:Meta]]
[[Category:Meta]]

Latest revision as of 19:15, 16 May 2022

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.