They never merge. Typically, log4j.properties files are overwritten, and you cannot determine exactly which one.
It depends on the sequence of loading the jar files by the container.
Therefore, it is recommended that you have one log4j.properties with several add-ons for other submodules in the main module of your application.
But this will create a problem while testing / working with submodules at the same time, regardless of how it stops logging during testing separately. In our case, the original version of pom was always used to exclude the resource (which will exclude the properties file when building the jar). However, in the local developer, the developers commented on this exception in the POM and can work independently.
source share