Last active
April 11, 2024 01:25
-
-
Save aruld/c998d72158efde334db8 to your computer and use it in GitHub Desktop.
Must have Time and Size Log4J appender for your application http://aruld.info/must-have-time-and-size-log4j-appender-for-your-application/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
I cannot find TimeAndSizeRollingAppender on http://www.simonsite.org.uk or maven repository, can you send it to me the code of uk.org.simonsite.log4j.appender.TimeAndSizeRollingAppender