Fixed!

The first thing I tried was to remove the log4j.properties file from
WEB-INF/classes and restarted TC.  It was still logging! and what's more, it
was logging to the file I had specified in the since-removed
log4j.properties file.  So, there is only one other app on the same TC
instance; a copy of the first app. I removed its log4j.properties file as
well.  Both apps on restart were still logging!  serious wtf!

Shut down TC, blew away its work directory, rm -r'd all over the place...
restarted, and finally got the "there are no appenders configured for this
logger" message (twice, once for each app). 

Brought it down again, upgraded the log4j.jar to 1.2.9 (I was probably
already using 1.2.8 actually), and then did the modifications you suggested
to the log4j.properties as below:


#log4j.properties

log4j.rootLogger=DEBUG, filer
log4j.logger.com.gb.security=WARN

log4j.appender.filer=org.apache.log4j.RollingFileAppender
log4j.appender.filer.layout=org.apache.log4j.PatternLayout
log4j.appender.filer.layout.ConversionPattern=%-5p %c - [%m] %d{ISO8601}%n 
log4j.appender.filer.File=/path/to/the/log/file/debug.log
log4j.appender.filer.MaxFileSize=100KB
log4j.appender.filer.MaxBackupIndex=4


Put this in one app, and got one "there are no appenders configured..." and
one debug.log file in the right location.  Put the other app's
log4.properties file in place, restarted, and now my two webapps are merrily
DEBUGing.

I'm getting debug messages that I had forgotten I should have been getting!


Also, thanks for the info re: loggers and additivity.


> -----Original Message-----
> From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 13, 2004 2:27 PM
> To: Tomcat Users List
> Subject: Re: webapp's log4j config acting wonky
> 
> .... wherein Jacob gives good advice......


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to