Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-545

slf4j-jdk-platform-logging - SLF4JPlatformLogger should use java.text.MessageFormat - not String.format()

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • 2.0.0
    • None
    • None
    • None
    •  Component: slf4j-jdk-platform-logging

    Description

      This line here:

      https://github.com/qos-ch/slf4j/blob/master/slf4j-jdk-platform-logging/src/main/java/org/slf4j/jdk/platform/logging/SLF4JPlatformLogger.java#L145

       

      message = String.format(message, params);

      Should instead be:

      message = MessageFormat.format(message, params);

       

      Such that it matches the expected format of System.Logger.log() ... as per https://docs.oracle.com/javase/9/docs/api/java/lang/System.Logger.html#log-java.lang.System.Logger.Level-java.lang.String-java.lang.Object...-

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            bygrave robin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: