Loading... (original) (raw)
Platform Logging bridge should use MessageFormat but it's using String.format
XMLWordPrintable
Details
- Type:
Bug
- Resolution: Fixed
- Priority:
Major
- Affects Version/s: 2.0.0-alpha5
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: