diff --git a/slf4j-site/src/site/pages/faq.html b/slf4j-site/src/site/pages/faq.html index 3bbf0cd6..7d7a226e 100755 --- a/slf4j-site/src/site/pages/faq.html +++ b/slf4j-site/src/site/pages/faq.html @@ -50,7 +50,7 @@
  • What are SLF4J's requirements?
  • -
  • What has changed in SLF4J version 1.8.0?
  • +
  • What has changed in SLF4J version 2.0.0?
  • Are SLF4J versions backward compatible?
  • @@ -96,6 +96,13 @@ Maven dependency? + +
  • + What are the JMPS module names of the + various SLF4J artificats? + +
  • + @@ -352,37 +359,38 @@ -
    - What has changed in SLF4J version 1.8.0? +
    + What has changed in SLF4J version 2.0.0?
    -

    Applicable to 2.x Note that the - 2.0.x series builds upon the 1.8.x series, as such the remarks - below are applicable to SLF4J 2.x as well.

    - -

    There are no client facing API changes in 1.8.x. For most - users upgrading to version 1.8.x should be a drop-in replacement + +

    There are no client facing API changes in 2.0.x. For most + users upgrading to version 2.0..x should be a drop-in replacement as long as the logging provider is updated as well.

    -

    In version 1.8.0, SLF4J has been modularized per In version 2.0.0, SLF4J has been modularized per JPMS/Jigsaw - specificaton. Moreover, slf4j-api now relies on the JMPS module names are listed + in another FAQ entry.

    + +

    More visibly, slf4j-api now relies on the ServiceLoader - mechanism to find its logging backend. Earlier versions relied - on the static binder mechanism which is no loger honored by - slf4j-api version 1.8.x. More specifically, when initializing - the LoggerFactory class will no longer search for - the StaticLoggerBinder class on the class path.

    + mechanism to find its logging backend. SLF4J 1.7.x and earlier + versions relied on the static binder mechanism which is no loger + honored by slf4j-api version 2.0.x. More specifically, when + initializing the LoggerFactory class will no longer + search for the StaticLoggerBinder class on the + class path.

    Instead of "bindings" now org.slf4j.LoggerFactory searches for "providers". These ship for example with - slf4j-nop-1.8.x.jar, slf4j-simple-1.8.x.jar or - slf4j-jdk14-1.8.x.jar. + slf4j-nop-2.0.x.jar, slf4j-simple-2.0.x.jar or + slf4j-jdk14-2.0.x.jar.

    The following table describes the results when various @@ -402,26 +410,26 @@ - 1.8.x - 1.8.x + 2.0.x + 2.0.x OK Same version for slf4j-api and provider 1.7.x - 1.8.x + 2.0.x no bindings can be found warning message - A 1.8.x providers do not act as 1.7.x/16.x + A 2.0.x providers do not act as 1.7.x/16.x comptatible bindings - 1.8.x + 2.0.x 1.7.x no providers can be found warning message - slf4j-api 1.8.x will no longer search for + slf4j-api 2.0.x will no longer search for StaticLoggerBinding @@ -852,7 +860,49 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

    +
    What are the JMPS + module names of the various SLF4J artificats? +
    +
    +

    Although compatible with Java 8, SLF4J version 2.0 supports + JMPS modularisation as introduced in Java 9. Here are the JMPS + module names for the various artificats shipping in SLF4J.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    artifact nameJMPS module name
    slf4j-api.jarorg.slf4j
    slf4j-simple.jarorg.slf4j.simple
    slf4j-jdk14.jarorg.slf4j.jul
    slf4j-nop.jarorg.slf4j.nop
    jcl-over-slf4j.jarorg.apache.commons.logging
    log4j-over-slf4j.jarlog4j
    +
    diff --git a/slf4j-site/src/site/pages/manual.html b/slf4j-site/src/site/pages/manual.html index 32bde441..91deafeb 100755 --- a/slf4j-site/src/site/pages/manual.html +++ b/slf4j-site/src/site/pages/manual.html @@ -65,12 +65,20 @@

    since 2.0.0 SLF4J API version 2.0.0 - requires Java 8 and introduces a backward-compatible fluent logging - API. By backward-compatible, we mean that existing logging + requires Java 8 and introduces a backward-compatible fluent + logging API. By backward-compatible, we mean that existing logging frameworks do not have to be changed in order for the user to benefit from the fluent logging API.

    +

    since 2.0.0 SLF4J API version 2.0.0 + relies on the ServiceLoader + mechanism to find its logging backend. See the relevant FAQ entry for more + details. +

    +

    Hello World

    As customary in programming tradition, here is an example @@ -509,7 +517,6 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail a warning about the suspected mismatch.

    -

    Consolidate logging via SLF4J