[ 
https://issues.apache.org/jira/browse/LOG4J2-1688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15655233#comment-15655233
 ] 

Gary Gregory commented on LOG4J2-1688:
--------------------------------------

Hi Stefan,

I do not see any problems in Git master.

- Can you double check that you are indeed using 2.7 and that no other version 
of Log4j2 ends up on the classpath? 
- if the problem persists, can you check against a Git master build? You can 
build locally and skip tests if you want with -DskipTests. You can also try to 
point to the Apache SNAPSHOT repository.
- I added the class {{org.apache.logging.slf4j.Log4j2Jira1688Test}}. Please 
patch on top of that to further demonstrate any issue you may have.

In reply to:

{noformat}
Only the first element (args[0]) of args will be logged - why?
{noformat}

That's because the pattern {{String someFormat = "test {}";}} picks up the 
first argument passed to {{org.slf4j.Logger.error(String, Object...)}}. The 
whole array is NOT the first parameter.

{noformat}
// Bug: The second logging of args sets all elements of args to null
{noformat}

The test passes.

Gary

> Multiple loggings of arguments are setting these arguments to null
> ------------------------------------------------------------------
>
>                 Key: LOG4J2-1688
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1688
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.7
>            Reporter: Stefan Hammelbeck
>
> We are using SLF4J over log4j Version 2.7.
> Calling {{org.slf4j.Logger.error(someFormat, args)}} *twice* with an 
> {{Object[] args}}  causes all elements of {{args}} to be set to {{null}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to