Alexander Klimetschek wrote:
I am wondering how to do proper logging in jackrabbit test cases. At
first I used System.out.println() during test case debugging, but now I
want to improve that and switch to "log" (o.a.j.test.LogPrintWriter)
provided by the test base class o.a.j.test.JUnitTest.
Problem is, I cannot get it to print out on the console, neither when
running in Eclipse nor when running with mvn test. I tried it with
providing a log4j.properties file and by specifying the log4j properties
via -D on the mvn command line, but nothing worked.
there's an existing log4j.properties file that you can edit in
jackrabbit-core/src/test/resources/log4j.properties
you just have to change the following line:
log4j.logger.org.apache.jackrabbit.test=DEBUG
to:
log4j.logger.org.apache.jackrabbit.test=DEBUG, stdout
regards
marcel