@@ -31,10 +31,10 @@ <h2>SLF4J user manual</h2>
3131
3232 < p > The Simple Logging Facade for Java (SLF4J) serves as a simple
3333 facade or abstraction for various logging frameworks, such as
34- java.util.logging, logback and log4j . SLF4J allows the end-user to
35- plug in the desired logging framework at < em > deployment</ em > time.
36- Note that SLF4J-enabling your library/application implies the
37- addition of only a single mandatory dependency, namely
34+ java.util.logging, logback and reload4j . SLF4J allows the end-user
35+ to plug in the desired logging framework at < em > deployment</ em >
36+ time. Note that SLF4J-enabling your library/application implies
37+ the addition of only a single mandatory dependency, namely
3838 < em > slf4j-api-${project.version}.jar</ em > .</ p >
3939
4040 < p > < span class ="label "> since 1.6.0</ span > If no binding is found on the
@@ -271,12 +271,14 @@ <h3 class="doAnchor" name="swapping">Binding with a logging
271271 </ dt >
272272 < dd > Binding/provider for < a
273273 href ="http://logging.apache.org/log4j/1.2/index.html "> log4j
274- version 1.2</ a > , a widely used logging framework. You also
275- need to place < em > log4j.jar</ em > on your class path. < span
276- class ="red "> Assuming you wish to continue to use the log4j 1.x
277- framework, given that the log4j 1.x has reached EOL status, we
278- strongly encourage you to use < em > slf4j-reload4j</ em >
279- instead.</ span > See below.
274+ version 1.2</ a > , a widely used logging framework. < span
275+ class ="red "> Given that log4j 1.x has been declared EOL in 2015
276+ and again in 2022, as of SLF4J 1.7.35, the < em > slf4j-log4j
277+ module</ em > automatically redirects to the
278+ < em > slf4j-reload4j</ em > module at < b > build time</ b > .</ span >
279+ Assuming you wish to continue to use the log4j 1.x framework,
280+ we strongly encourage you to use < code > slf4j-reload4j</ code >
281+ instead. See below.
280282 < p />
281283
282284 </ dd >
@@ -445,13 +447,14 @@ <h3 class="doAnchor" name="projectDep">Declaring project
445447 you need to do is to declare "ch.qos.logback:logback-classic" as
446448 a dependency in your < em > pom.xml</ em > file as shown below. In
447449 addition to < em > logback-classic-${logback.version}.jar</ em > ,
448- this will pull < em > slf4j-api-${latest.stable.version}.jar</ em > as well
449- as < em > logback-core-${logback.version}.jar</ em > into your
450+ this will pull in
451+ < em > slf4j-api-${latest.stable.version}.jar</ em > as well as
452+ < em > logback-core-${logback.version}.jar</ em > into your
450453 project. Note that explicitly declaring a dependency on
451454 < em > logback-core-${logback.version}</ em > or
452- < em > slf4j-api-${latest.stable.version}.jar</ em > is not wrong and may
453- be necessary to impose the correct version of said artifacts by
454- virtue of Maven's "nearest definition" dependency mediation
455+ < em > slf4j-api-${latest.stable.version}.jar</ em > is not wrong and
456+ may be necessary to impose the correct version of said artifacts
457+ by virtue of Maven's "nearest definition" dependency mediation
455458 rule.
456459 </ p >
457460
@@ -465,19 +468,18 @@ <h3 class="doAnchor" name="projectDep">Declaring project
465468
466469 <!-- ================================== -->
467470 < p > < span class ="label notice "> reload4j</ span > If you wish to use
468- reload4j as the underlying logging framework, all you need to do is
469- to declare "org.slf4j:slf4j-reload4j" as a dependency in your
470- < em > pom.xml</ em > file as shown below. In addition to
471- < em > slf4j-reload4j-${latest.stable.version}.jar</ em > , this will pull
472- < em > slf4j-api-${latest.stable.version}.jar</ em > as well as
473- < em > reload4j-${reload4j.version}.jar</ em > into your project. Note
474- that explicitly declaring a dependency on
475- < em > reload4j-${reload4j.version}.jar</ em > or
476- < em > slf4j-api-${latest.stable.version}.jar</ em > is not wrong and may
477- be necessary to impose the correct version of said artifacts by
478- virtue of Maven's "nearest definition" dependency mediation
479- rule.</ p >
480-
471+ reload4j as the underlying logging framework, all you need to do
472+ is to declare "org.slf4j:slf4j-reload4j" as a dependency in your
473+ < em > pom.xml</ em > file as shown below. In addition to
474+ < em > slf4j-reload4j-${latest.stable.version}.jar</ em > , this will
475+ pull in < em > slf4j-api-${latest.stable.version}.jar</ em > as well
476+ as < em > reload4j-${reload4j.version}.jar</ em > into your project.
477+ Note that explicitly declaring a dependency on
478+ < em > reload4j-${reload4j.version}.jar</ em > or
479+ < em > slf4j-api-${latest.stable.version}.jar</ em > is not wrong and
480+ may be necessary to impose the correct version of said artifacts
481+ by virtue of Maven's "nearest definition" dependency mediation
482+ rule.</ p >
481483
482484< pre class ="prettyprint source "> <dependency>
483485 <groupId> org.slf4j</groupId>
@@ -488,19 +490,10 @@ <h3 class="doAnchor" name="projectDep">Declaring project
488490
489491 <!-- ================================== -->
490492
491- < p > < span class ="label notice "> log4j</ span > If you wish to use
492- log4j as the underlying logging framework, all you need to do is
493- to declare "org.slf4j:slf4j-log4j12" as a dependency in your
494- < em > pom.xml</ em > file as shown below. In addition to
495- < em > slf4j-log4j12-${latest.stable.version}.jar</ em > , this will pull
496- < em > slf4j-api-${latest.stable.version}.jar</ em > as well as
497- < em > log4j-${log4j.version}.jar</ em > into your project. Note
498- that explicitly declaring a dependency on
499- < em > log4j-${log4j.version}.jar</ em > or
500- < em > slf4j-api-${latest.stable.version}.jar</ em > is not wrong and may
501- be necessary to impose the correct version of said artifacts by
502- virtue of Maven's "nearest definition" dependency mediation
503- rule.</ p >
493+ < p > < span class ="label notice "> log4j</ span > As of version 1.7.35,
494+ declaring a dependency on < code > org.slf4j:slf4j-log4j12</ code >
495+ redirects to < code > org.slf4j:slf4j-reload4j</ code > by virtue of
496+ Maven <relocation> directive. </ p >
504497
505498< pre class ="prettyprint source "> <dependency>
506499 <groupId> org.slf4j</groupId>
@@ -517,12 +510,12 @@ <h3 class="doAnchor" name="projectDep">Declaring project
517510 framework, all you need to do is to declare
518511 "org.slf4j:slf4j-jdk14" as a dependency in your < em > pom.xml</ em >
519512 file as shown below. In addition to
520- < em > slf4j-jdk14-${latest.stable.version}.jar</ em > , this will pull
521- < em > slf4j-api-${latest.stable.version}.jar</ em > into your project.
522- Note that explicitly declaring a dependency on
523- < em > slf4j-api-${latest.stable.version}.jar</ em > is not wrong and may
524- be necessary to impose the correct version of said artifact by
525- virtue of Maven's "nearest definition" dependency mediation
513+ < em > slf4j-jdk14-${latest.stable.version}.jar</ em > , this will
514+ pull in < em > slf4j-api-${latest.stable.version}.jar</ em > into
515+ your project. Note that explicitly declaring a dependency on
516+ < em > slf4j-api-${latest.stable.version}.jar</ em > is not wrong and
517+ may be necessary to impose the correct version of said artifact
518+ by virtue of Maven's "nearest definition" dependency mediation
526519 rule.</ p >
527520
528521< pre class ="prettyprint source "> <dependency>
0 commit comments