Loading... (original) (raw)

Uploaded image for project: 'SLF4J'

  1. SLF4J
  2. SLF4J-529

Platform Logging bridge should use MessageFormat but it's using String.format

XMLWordPrintable

Details

Description

java.lang.System.Logger.log is specified to accept the message format of MessageFormat. However, the current SLF4JPlatformLogger implementation uses String.format instead of MessageFormat. As a result, the current implementation cannot format the message correctly.

Expected and actual behavior

LoggerFinder finder = System.LoggerFinder.getLoggerFinder(); Logger systemLogger = finder.getLogger("smoke", null); systemLogger.log(Level.INFO, "hello {0}", "world");

Expected output:

Actual output:

Activity