Logging log4j output to syslog

259 views
Skip to first unread message

Matthew Grasser

unread,
Sep 13, 2013, 5:32:22 PM9/13/13
to play-fr...@googlegroups.com
I've created a file, `log4j.properties` in the conf folder of my application that includes the following:
log4j.rootLogger=ERROR, SYSLOG 
log4j.logger.play=WARN
# SYSLOG
log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
log4j.appender.SYSLOG.syslogHost=127.0.0.1
log4j.appender.SYSLOG.facility=local0
log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.SYSLOG.layout.ConversionPattern=%d{ABSOLUTE} %-5p ~ %m%n
 However the logs continue to post to logs/system.out.

What am I missing here?

Ben McCann

unread,
Sep 13, 2013, 6:39:06 PM9/13/13
to play-fr...@googlegroups.com
Play 2 by default uses slf4j with logback. I'm not sure if you've setup log4j on your own, but if you're using the default logging that comes with Play then you need to use the logback.xml format
Reply all
Reply to author
Forward
0 new messages