Skip to content

Instantly share code, notes, and snippets.

@aruld

aruld/log4j.properties

Last active Jul 13, 2016
Embed
What would you like to do?
Must have Time and Size Log4J appender for your application http://aruld.info/must-have-time-and-size-log4j-appender-for-your-application/
log4j.rootLogger=DEBUG,rollingByDate
# logfile is set to be a TimeAndSizeRollingAppender. Keep 100 backup files before rotating and rolling daily, compression set to GZ
log4j.appender.rollingByDate=uk.org.simonsite.log4j.appender.TimeAndSizeRollingAppender
log4j.appender.rollingByDate.File=/logs/app.log
log4j.appender.rollingByDate.RollOnStartup=true
log4j.appender.rollingByDate.DateRollEnforced=true
log4j.appender.rollingByDate.Threshold=DEBUG
log4j.appender.rollingByDate.DatePattern=.yyyy-MM-dd
log4j.appender.rollingByDate.MaxFileSize=10MB
log4j.appender.rollingByDate.MaxRollFileCount=100
log4j.appender.rollingByDate.ScavengeInterval=30000
log4j.appender.rollingByDate.BufferedIO=false
log4j.appender.rollingByDate.CompressionAlgorithm=GZ
log4j.appender.rollingByDate.CompressionMinQueueSize=5
log4j.appender.rollingByDate.layout=org.apache.log4j.PatternLayout
log4j.appender.rollingByDate.layout.ConversionPattern=%-5p %-23d{ISO8601} [%t] %x: %c{1} - %m%n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.