I think you’ll find that both
log4j2.xml are on the classpath and it’s classpath ordering determining which one wins.
Where are you seeing ProjectB’s log config “winning”? (eg when running tests or when actually running your application)
I personally don’t think any library should pack
log4j2.xml inside. It’s only wars and applications which should pack logging config. Can you move from
src/test/resources so it’s not packed inside the jar?
Or perhaps you could set the
log4j.configurationFile system property and use a unique path instead of