Skip to content
Browse files

updated default logging config to roll and gz

  • Loading branch information...
1 parent a086fb3 commit e604084c4b02ef962fc35dbdb9e13cf5f2c38661 @chetan committed Apr 2, 2012
Showing with 10 additions and 5 deletions.
  1. +6 −1 buildfile_libraries.rb
  2. +4 −4 conf/log4j.properties
View
7 buildfile_libraries.rb
@@ -16,7 +16,12 @@
SOLR_COMMONS_CSV = [ "org.apache.solr:solr-commons-csv:jar:1.4.1" ]
-LOGGER = [ "org.slf4j:slf4j-api:jar:1.6.4", 'org.slf4j:slf4j-log4j12:jar:1.6.4', 'log4j:log4j:jar:1.2.16' ]
+LOGGER = [
+ 'org.slf4j:slf4j-api:jar:1.6.4',
+ 'org.slf4j:slf4j-log4j12:jar:1.6.4',
+ 'log4j:log4j:jar:1.2.16',
+ 'log4j:apache-log4j-extras:jar:1.1'
+ ]
JSON_SMART = [ 'net.minidev:json-smart:jar:1.0.9-1' ]
View
8 conf/log4j.properties
@@ -8,9 +8,9 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%-17t] %-32.32c:%-3L - %m%n
-log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.logfile.File=${log.root}/sewer.log
-log4j.appender.logfile.DatePattern=yyyy-MM-dd
-log4j.appender.logfile.MaxBackupIndex=7
+log4j.appender.logfile=org.apache.log4j.rolling.RollingFileAppender
+log4j.appender.logfile.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
+log4j.appender.logfile.rollingPolicy.FileNamePattern=${log.root}/sewer.%d{yyyy-MM-dd}.log.gz
+log4j.appender.logfile.rollingPolicy.ActiveFileName=${log.root}/sewer.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %-5p [%-17t] %-32.32c:%-3L - %m%n

0 comments on commit e604084

Please sign in to comment.
Something went wrong with that request. Please try again.