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)
_______________________________________________
slf4j-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/slf4j-dev