If your module is a jar that will be included as a dependency by another module, you should not have a logback.xml file - it depends on the user of the jar to determine the logging configuration. Also, you should not specify logback as a dependency, as the user must choose the implementation of logging.
I assume that one of your two modules depends on the other. Thus, the dependent module should have logback.xml, and the other should not.
When unit testing each module, you can put logback-test.xml
in src/test/resources
and add a login as a function of the test area. Thus, it will not be displayed as a module dependency, and the log XML file will not be exported.
source share