I have a gradle project and the structure looks like this
>
> main (one project)
> shared (another project)
> api
>> shared2 (another project)
main project depends on both shared and shared2 projects. Both shared and shared2 projects have a logback-test.xml in their src/test/resources folder and the main project has a logback.xml in its src/main/resources folder.
When I run the main project in eclipse using its main Application class I am expecting that only logback.xml is loaded in classpath. Instead I see warnings that multiple slf4j bindings are found and more importantly the logging settings are being applied from the logback-test.xml instead of logback.xml. Here is the folder structure for further clarification
>
> main
> > src/main/resources
> > > logback.xml
> shared
> > src/test/resources
> > > logback-test.xml
> api/shared2
> > src/test/resources
> > > logback-test.xml
In both logback-test.xml files I have enabled org.springframework debugging at DEBUG level and in logback.xml its set at INFO level. When I start the application I see the spring DEBUG logs.
Here is the sample github project https://github.com/adeelmahmood/logback-test-conf-issue
multiple slf4j bindings are found, it also gives the location of these bindings. Could you please share that warning message?