You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2012/07/11 22:13:35 UTC

[jira] [Closed] (LOG4J2-49) double message formatting w/SLF4JLogger

     [ https://issues.apache.org/jira/browse/LOG4J2-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers closed LOG4J2-49.
-----------------------------


Closing since there have not been any updates to this issue since it was marked resolved.
                
> double message formatting w/SLF4JLogger
> ---------------------------------------
>
>                 Key: LOG4J2-49
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-49
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: API
>            Reporter: John Vasileff
>            Assignee: Ralph Goers
>
> SLF4JLogger implements LocationAwareLogger which has
> public void log(Marker marker, String fqcn, int level, String message, Object[] argArray, Throwable t);
> Callers of this method format the message in advance.  But SLF4JLogger also performs formatting.
> Example:
> slf4jLogger.info("slf4jLogger {}", "is formated twice? <{}>"); // works
> slf4jXlogger.info("slf4jXLogger {}", "is formated twice? <{}>"); // fails
> log4j2Logger.info("log4j2Logger shouldn't format <{}>"); // works
> jclOverSlf4jLogger.info("jclOverSlf4jLogger shouldn't format <{}>"); // fails
> Output:
> INFO Log4j2Testing [main] slf4jLogger is formated twice? <{}>
> INFO Log4j2Testing [main] slf4jXLogger is formated twice? <[[is formated twice? <{}>], null]>
> INFO Log4j2Testing [main] log4j2Logger shouldn't format <{}>
> INFO Log4j2Testing [main] jclOverSlf4jLogger shouldn't format <[null, null]>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org