Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Configuring blitz4j

jquatier edited this page Apr 15, 2014 · 4 revisions

Sample log4j.properties file to use Blitz4j async appender:

log4j.rootLogger=INFO,stdout,error
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout.ConversionPattern=%d{MM-dd HH:mm:ss} %p %F.%M(%L)<%t> %m%n
log4j.appender.error=org.apache.log4j.DailyRollingFileAppender
log4j.appender.error.File=/tmp/log.err
log4j.appender.error.layout=com.netflix.logging.log4jAdapter.NFPatternLayout
log4j.appender.error.Append=true
log4j.appender.error.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p %c{3}.%M(%L)<%t>- %m%n
log4j.appender.error.Threshold=ERROR
log4j.rootCategory=OFF
log4j.appender.stdout.layout=com.netflix.logging.log4jAdapter.NFPatternLayout
log4j.logger.asyncAppenders=INFO,stdout,error
batcher.com.netflix.logging.AsyncAppender.stdout.waitTimeinMillis=120000

Configuration properties for troubleshooting logging & formatting issues, which can be useful when working with select versions of log4j and slf4j:

netflix.blitz4j.printLoggingErrors=true
log4j.debug=true