Hi

I have written a java web application (and a batch application some months in the past) and tried to use log4j to debug these applications. It seems to work somehow but shows very strange behaviour as all logger settings in log4j.properties except the rootLogger are ignored. This is a problem because I can not just get the log messages for my classes but have to go through thousands of messages produced by hibernate or spring, etc. My log4j.properties file looks the following:

log4j.rootLogger=INFO,stdout
log4j.logger.de.myproject.controller=DEBUG,R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:/myproject.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

The problem is that the second line is completely ignored. Does anyone have a solution for this?

Regards
   Klemens


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to