I have put log4j to my buildpath, but I get the following message when I run my application:
log4j:WARN No appenders could be found for logger (dao.hsqlmanag
My Eclipse installation could not find log4j.properties
when running JUnit tests from Eclipse, even though the file was located at src/test/resources
.
The reason was that Eclipse (or the m2e connector) did not copy content from src/test/resources
to the expected output folder target/test-classes
- the root cause was that in the project's properties under Java Build Path -> Source tab -> Source folders on build path -> src/test/resources, somehow there was an Excluded: **
entry. I removed that excluded entry.
Alternatively, I could have manually copied src/test/resources/log4j.properties
to target/test-classes/log4j.properties
.