logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hansen <markli...@javector.com>
Subject Configuring Log4J with Maven Testing and Production
Date Tue, 03 Apr 2007 17:13:42 GMT
I use Log4J and build my applications with Maven2.  I have a log4j.xml 
config file in the src/main/resources directory so that Maven2 builds it 
into the JAR with my application.

However, I have a different log4j.xml that I want to use with the JUnit 
test that run as part of my Maven build process.  I'd like to put that 
log4j.xml (testing) in the src/test/resources directory and have it 
overide the production version in src/main/resources.  However, Maven 
doesn't seem to work that way.  Instead, the production version of 
log4j.xml seems to come first on the testing classpath and therefore 
gets loaded instead of the testing version of log4j.xml.

I'm sure others must have faced this issue.  Are there any recommended 
solutions to the problem?

Thanks,

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message