[JIRA] (SLF4J-416) Format string parameter substitution not working for single exception argument

[ https://jira.qos.ch/browse/SLF4J-416?page=com.atlassian.jira.plugin.system.i... ] Nikolay Fedorovskikh commented on SLF4J-416: -------------------------------------------- Duplicate: LOGBACK-1183 , LOGBACK-1302 [https://github.com/qos-ch/slf4j/pull/166|https://github.com/qos-ch/slf4j/pull/166]
Format string parameter substitution not working for single exception argument ------------------------------------------------------------------------------
Key: SLF4J-416 URL: https://jira.qos.ch/browse/SLF4J-416 Project: SLF4J Issue Type: Bug Components: Core API Affects Versions: 1.7.25 Reporter: Stefan Podkowinski Assignee: SLF4J developers list
Some logging statements will not work as intended after upgrading to 1.7.25, due to a change in the way exceptions are handled in {{MessageFormatter}}. The following test will illustrate the issue: {code:java} @Test public void testExceptionAsParameter() { Exception e = new Exception("A terrible mistake"); result = MessageFormatter.format("Error! {}", e).getMessage(); assertEquals("Error! A terrible mistake", result); } {code} Result: {noformat} org.junit.ComparisonFailure: Expected :Error! A terrible mistake Actual :Error! {} {noformat} This seems to be a regression of SLF4J-353.
-- This message was sent by Atlassian JIRA (v7.3.1#73012)
participants (1)
-
QOS.CH (JIRA)