Заставить slf4j использовать logback

Есть ли способ заставить slf4j использовать определенного провайдера журналов (logback в моем случае)? Как в их документах:

Multiple bindings were found on the class path

SLF4J API is desinged to bind with one and only one underlying logging framework at a time. If more than one binding is present on the class path, SLF4J will emit a warning, listing the location of those bindings. When multiple bindings are available on the class path, select one and only one binding you wish to use, and remove the other bindings. For example, if you have both slf4j->simple-1.6.6.jar and slf4j-nop-1.6.6.jar on the class path and you wish to use the nop (>no-operation) binding, then remove slf4j-simple-1.6.6.jar from the class path. If it is not possible to remove the superflous bindings, SLF4J will still bind with one logging framework/implementation. As of version 1.6.6, SLF4J will name the framework/implementation class it is actually bound to.

NOTE The warning emitted by SLF4J is just that, a warning.

В моем случае у меня естьlog4j.jar, slf4j-log4j12.jar, log4j-over-slf4j.jar и все jar logback в classpath. Я знаю, что ошибочно иметьslf4j-log4j12.jar а такжеlog4j-over-slf4j.jar вместе, но мой проект очень большой, и не всегда просто найти и исключить maven зависимость. В этом случае slf4j даже не печатал никаких предупреждений, потому что мы используем только конфиги logback. Мне потребовался день, чтобы понять этот баночный ад.

Все, что я хочу, это заставить slf4j использовать logback через аргумент JVM, например, чтобы он мог печатать предупреждения и я мог исключить jar в будущем.

Ответы на вопрос(2)

Ваш ответ на вопрос