unit test won't show log4j debug output

can this be adjusted somewhere?

I have log4j.properites in src dir, which gets copied
into classes dir on compile.
On normal run debug output appears on console,
but not when I run a unit test from IDEA.

3 comments
Comment actions Permalink

Michael Damberger wrote:

can this be adjusted somewhere?

I have log4j.properites in src dir, which gets copied
into classes dir on compile.
On normal run debug output appears on console,
but not when I run a unit test from IDEA.


What I do is create a new global library (a project library would
suffice as well) with just the log4j.properties in it. Then move it to
the top of my classpath (resoures) and bingo, it should start to dump
out a lot of trace on the console. In essense, just make sure the
property file is top of the classpath.

-=david=-

0
Comment actions Permalink

the log4j.properties ARE on classpath because
they are in the classes dir.

0
Comment actions Permalink

ok - sorry, did read to quick.
You mean it should be on TOP of classpath - I'll try that.

This means it gets overriden by some IDEA log4j.properties
otherwise? I would consider that a bug.

0

Please sign in to leave a comment.