Reputation: 429
I added a bunch of logging to a specific class that's been giving me troubles, ramped up the log4j.properties file and expected to see a ton of debugging information.
While I do see more info the messages from one, specific class-- the one I was most interested in-- seems to be completely missing.
Oddly enough, I copied log4j.properties file from the test server-- where it was, indeed, outputting the right info-- over to the production server-- they're identical.
Here's the contents of the log4j.properties:
log4j.debug=false
log4j.rootLogger=INFO, S
log4j.category.com.communitect=DEBUG, F1, S
log4j.additivity.com.communitect=false
log4j.appender.F1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.F1.DatePattern='.'yyyy-MM-dd
log4j.appender.F1.File=${catalina.base}/logs/smilereminder_log
log4j.appender.F1.layout=org.apache.log4j.PatternLayout
log4j.appender.F1.layout.ConversionPattern=%d %5p [%t] (%c{2}) - %m%n
log4j.appender.S=org.apache.log4j.ConsoleAppender
log4j.appender.S.layout=org.apache.log4j.PatternLayout
log4j.appender.S.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n
That file is in the lib directory of my Tomcat install.
The package I see nothing from is this:
package com.communitect.business;
The way I declare the logger is this:
static private final Logger logger = Logger.getLogger( PersonalReminderRules.class );
All of the messages from this class show up on my test server so I know the log4j.properties file should work great.
I looked around for an additional log4j.properties file but there doesn't seem to be one. There isn't an .xml configuration file, either.
Something's eluding me. Any ideas?
Upvotes: 2
Views: 2975
Reputation: 429
@oers, good idea, thank you! :)
Here was the solution we found:
So it appears that the appVoice WebApp context had a log4j.jar in it. Removing it seems to have fixed the problem.
I'm assuming that classloading the webapps "overrode" the classes loaded originally and consequently with a brand new configuration.
Upvotes: 1