[jboss-jira] [JBoss JIRA] Resolved: (JBLOGGING-53) Slf4jLogger wrong formatting in methods with Object arrays
David Lloyd (JIRA)
jira-events at lists.jboss.org
Wed Jan 5 11:00:20 EST 2011
[ https://issues.jboss.org/browse/JBLOGGING-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Lloyd resolved JBLOGGING-53.
----------------------------------
Resolution: Done
Fixed for slf4j-jboss-logmanager 1.0.0.CR5
> Slf4jLogger wrong formatting in methods with Object arrays
> ----------------------------------------------------------
>
> Key: JBLOGGING-53
> URL: https://issues.jboss.org/browse/JBLOGGING-53
> Project: JBoss Logging
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jboss-logging-logmanager
> Affects Versions: 3.0.0.Beta4-jboss-logging
> Environment: JBoss AS 6.0.0.Final
> Reporter: Adam Michalik
> Assignee: David Lloyd
>
> Slf4jLogger in JBoss Logging Manager formats the messages in logging methods with Object array parameters (ie. info(String, Object[]), debug(String, Object[]) etc.) the wrong way. MessageFormatter.format(format, argArray) is used, but MessageFormatter.arrayFormat(format, argArray) should be used instead. Using the format() method results in putting the whole array in the first placeholder and leaving the following ones empty.
> Example:
> logger.info("1: {} 2: {} 3: {}", new Object[] { "ONE", "TWO", "THREE" });
> Expected output:
> 1: ONE 2: TWO 3: THREE
> Actual output:
> 1: [ONE, TWO, THREE] 2: {} 3: {}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list