You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Mikhail Vladimirov (Jira)" <ji...@apache.org> on 2019/11/18 08:48:00 UTC

[jira] [Created] (LOG4J2-2726) AsyncAppender expands parameters twice

Mikhail Vladimirov created LOG4J2-2726:
------------------------------------------

             Summary: AsyncAppender expands parameters twice
                 Key: LOG4J2-2726
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2726
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 2.8.2
            Reporter: Mikhail Vladimirov


Log4j2.xml:

{code:xml}
<?xml version="1.0" encoding="UTF-8" ?>
<Configuration>
  <Appenders>
    <Console name="console" />
    <Async name="async">
      <AppenderRef ref="console" />
    </Async>
  </Appenders>
  <Loggers>
    <Root level="info">
      <AppenderRef ref="async" />
    </Root>
  </Loggers>
</Configuration>
{code}

Code, that reproduces the problem:

{code:java}
LogManager.getRootLogger().info("{}", "Foo{}Bar");
{code}

Expected output:
{noformat}
Foo{}Bar
{noformat}

Actual output:
{noformat}
FooFoo{}BarBar
{noformat}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)