[JIRA] Updates for SLF4J-529: Platform Logging bridge should use MessageFormat but it's using String.format

SLF4J / SLF4J-529 [Open] Platform Logging bridge should use MessageFormat but it's using String.format ============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/SLF4J-529 ============================== Issue created ------------------------------ Taku Miyakawa created this issue on 22/Dec/21 2:11 PM Summary: Platform Logging bridge should use MessageFormat but it's using String.format Issue Type: Bug Affects Versions: 2.0.0-alpha5 Assignee: SLF4J developers list Components: Unspecified Created: 22/Dec/21 2:11 PM Environment: Priority: Major Reporter: Taku Miyakawa External issue URL: https://github.com/qos-ch/slf4j/pull/273 Description: [java.lang.System.Logger.log|https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Syste......)] 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. h1. Expected and actual behavior {code:java} LoggerFinder finder = System.LoggerFinder.getLoggerFinder(); Logger systemLogger = finder.getLogger("smoke", null); systemLogger.log(Level.INFO, "hello {0}", "world"); {code} Expected output: {code} INFO smoke - hello world {code} Actual output: {code} INFO smoke - hello {0} {code} ============================== This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)
participants (1)
-
QOS.CH (JIRA)