I'm trying to configure Tomcat and a webapp (Atlassian JIRA) to log everything over syslog.
Here is what I added to the webapp log4j.properties (atlassian-jira/WEB-INF/classes/log4j.properties) :
log4j.rootLogger=WARN, syslog
log4j.appender.syslog=org.apache.log4j.net.SyslogAppender
log4j.appender.syslog.facility=LOCAL0
log4j.appender.syslog.layout.ConversionPattern=%-5p [%t] [%c]: %m%n
log4j.appender.syslog.layout=org.apache.log4j.PatternLayout
log4j.appender.syslog.SyslogHost=my.syslog.server.fqdn
However, nothing is sent over syslog. I sniffed outgoing packets on the port 514 and nothing appears.
Thanks for your help!
Here is the solution I currently use :
I imagine this solution isn't java-world-compliant. But it's working.
However, I'm still looking for a cleaner way to log to syslog.