logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Wen <crest....@gmail.com>
Subject Re: Why LogManager load log4j.properties from target/test-classes when run TestNG in Eclipse
Date Fri, 30 Jun 2017 07:36:51 GMT
Hi Ralph,
Thanks for your reply!
I am confused about it because my class file located in src/main/java rather than src/test/java.
To raise this in Log4j, I just want to check if somebody has the same confusion and already
know the root cause of it.
You are right. I will try to ask Eclipse community for clarification.
Bruce Wen 

    On Thursday, June 29, 2017 11:17 PM, Ralph Goers <ralph.goers@dslextreme.com> wrote:

 If Eclipse (or any other test environment) didn’t add test-classes to the class path how
would it find your test classes. They would normally be first in the class path so that files
you want to override for testing are picked up. I suspect this is why it is picking up a log4j.properties
there instead of the classes directory. In any case, this has little, if anything, to do with


> On Jun 29, 2017, at 1:36 PM, Bruce Wen <crest.boy@gmail.com> wrote:
> Hi All,
> I am wondering how classpath is decided when run TestNG suite xml file in Eclipse. Why
it add target/test-classes in classpath and LogManager load log4j.properties from there rather
than target/classes folder.
> I hope somebody can help clarify the root reason for that. Thanks!
> Bruce Wen

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message