LoggerFields for Syslog (output log priority and stack trace)
问题 Log4j can send logs to Papertrail using a syslog appender (documentation): log4j.appender.syslog=org.apache.log4j.net.SyslogAppender log4j.appender.syslog.Facility=LOCAL7 log4j.appender.syslog.FacilityPrinting=false log4j.appender.syslog.Header=true log4j.appender.syslog.SyslogHost=<host>.papertrailapp.com:XXXXX log4j.appender.syslog.layout=org.apache.log4j.PatternLayout log4j.appender.syslog.layout.ConversionPattern=%p: (%F:%L) %x %m %n Notice the handy ConversionPattern property. I have