Selam,
application.conf içerisinde log4j.properties dosyasını belirterek
ilgili dosyaları conf dizini altında oluşturuyoruz.
application.log.path=/log4j-dev.properties
%prod.application.log.path=/log4j-prod.properties
--- log4j-dev.properties
log4j.rootLogger=ERROR, Rolling, Console
log4j.logger.play=DEBUG
# Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d %-5p - %m%n
# Rolling files
log4j.appender.Rolling=org.apache.log4j.RollingFileAppender
log4j.appender.Rolling.File=logs/application.log
log4j.appender.Rolling.MaxFileSize=1MB
log4j.appender.Rolling.MaxBackupIndex=100
log4j.appender.Rolling.layout=org.apache.log4j.PatternLayout
--- log4j-prod.properties
log4j.rootLogger=ERROR, Rolling
log4j.logger.play=DEBUG
# Rolling files
log4j.appender.Rolling=org.apache.log4j.RollingFileAppender
log4j.appender.Rolling.File=logs/application.log
log4j.appender.Rolling.MaxFileSize=1MB
log4j.appender.Rolling.MaxBackupIndex=100
log4j.appender.Rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.Rolling.layout.ConversionPattern=%d %-5p - %m%n
PS: Windows sistemlerde -sebebini bilmiyorum- çalışmayabilir.
2012/5/29 Ahmet Alp Balkan <
ahmetal...@gmail.com>: