The thing is though, it doesn't seem to be a problem with log4j *finding* the
configuration file. That seems ok.

When you say you usually just put your log4j config file in
src/test/resources, I assume you mean you use a default name (like
log4j.properties) and then put another log4j.properties in
src/main/resources for your production environment? If that's the case then
I'm not sure why that would be any more deterministic than having two log4j
properties files that are simply named differently for testing and
production (and the correct file name is chosen according to the
environment). I mean, somehow or another you need to have different
configurations for testing and production, right? I'm inclined to think that
naming the files differently is even possibly clearer, since then it should
be obvious from the file name which configuration is being used. Or have I
misunderstood? (Entirely possible!)

In any event, I've tried removing the systemProperties settings and putting
a log4j.properties in src/test/resources as you've suggested, but exactly
the same thing happens: log4j appears to be configured, but there's no
logging output other than statements from log4j itself. I'm probably missing
something obvious here, otherwise I'm sure lots more people would be having
this problem ... just wish I could see what it was :)


--
View this message in context: 
http://www.nabble.com/-M2--log4j-output-does-not-display-when-running-surefire-plugin-t1747117.html#a4751277
Sent from the Maven - Users forum at Nabble.com.


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

Reply via email to