diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index 027e9ee95edbb868bc9bb0eefa02b240c4b9c667..03e279e3565224725a293f9d4703718245f24494 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -567,9 +567,15 @@ as a new project it would use a different logging dependency. The first choice w probably be the Simple Logging Facade for Java ( http://www.slf4j.org[SLF4J]), which is also used by a lot of other tools that people use with Spring inside their applications. -Switching off `commons-logging` is easy: just make sure it isn't on the classpath at -runtime. In Maven terms you exclude the dependency, and because of the way that the -Spring dependencies are declared, you only have to do that once. +There are basically two ways to switch off `commons-logging`: + +. Exclude the dependency from the `spring-core` module (as it is the only module that + explicitly depends on `commons-logging`) +. Depend on a special `commons-logging` dependency that replaces the library with + an empty jar (more details can be found in the + http://slf4j.org/faq.html#excludingJCL[SLF4J FAQ]) + +To exclude commons-logging, add the following to your `dependencyManagement` section: [source,xml,indent=0] [subs="verbatim,quotes,attributes"] @@ -579,7 +585,6 @@ Spring dependencies are declared, you only have to do that once. org.springframework spring-core {spring-version} - runtime commons-logging @@ -624,7 +629,6 @@ implementation itself. In Maven you would do that like this org.springframework spring-core {spring-version} - runtime commons-logging @@ -636,25 +640,21 @@ implementation itself. In Maven you would do that like this org.slf4j jcl-over-slf4j 1.5.8 - runtime org.slf4j slf4j-api 1.5.8 - runtime org.slf4j slf4j-log4j12 1.5.8 - runtime log4j log4j 1.2.14 - runtime ---- @@ -694,13 +694,11 @@ is your dependency declaration: org.springframework spring-core {spring-version} - runtime log4j log4j 1.2.14 - runtime ----