[slf4j-dev] [JIRA] (SLF4J-416) Format string parameter substitution not working for single exception argument
QOS.CH (JIRA)
noreply-jira at qos.ch
Tue Jul 25 10:03:00 CEST 2017
Stefan Podkowinski created SLF4J-416:
----------------------------------------
Summary: 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)
More information about the slf4j-dev
mailing list