You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "hemant budhewar (JIRA)" <ji...@apache.org> on 2018/03/27 05:40:00 UTC

[jira] [Updated] (LOG4J2-2286) Issue : Printing stack trace twice when JSON encoding enabled

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

hemant budhewar updated LOG4J2-2286:
------------------------------------
    Description: 
 

Description : Steps to reproduce :           

 
 # Configure appender.root.layout.pattern = ${ "class": "%c* \{1}*", "data" : "%m%enc\{%xThrowable}{JSON}"}%n

 # warn("Test Exception", ex);

 

Actual Result :

{class": "Test", "data" : "Test Exception java.lang.RuntimeException: +Heer+\u000A\u0009at test.Test.test(Test.java:20) ~[bin/:?]\u000A\u0009at test.Test.main(Test.java:41) [bin/:?]\u000A"}

java.lang.RuntimeException: +Heer+

       at test.Test.test(Test.java:20) ~[bin/:?]

       at test.Test.main(Test.java:41) [bin/:?]

Expected result :

{"class": "Test", "data" : "Test Exception java.lang.RuntimeException: +Heer+\u000A\u0009at test.Test.test(Test.java:20) ~[bin/:?]\u000A\u0009at test.Test.main(Test.java:41) [bin/:?]\u000A"}

  was:
 

Description : Steps to reproduce :           

 
 # Configure appender.root.layout.pattern = $\{ "class": "%c*{1}*", "data" : "%m%xThrowable"}%n
 # warn("Test Exception", ex);

 

Actual Result :

{class": "Test", "data" : "Test Exception java.lang.RuntimeException: +Heer+\u000A\u0009at test.Test.test(Test.java:20) ~[bin/:?]\u000A\u0009at test.Test.main(Test.java:41) [bin/:?]\u000A"}

java.lang.RuntimeException: +Heer+

       at test.Test.test(Test.java:20) ~[bin/:?]

       at test.Test.main(Test.java:41) [bin/:?]

Expected result : {"class": "Test", "data" : "Test Exception java.lang.RuntimeException: +Heer+\u000A\u0009at test.Test.test(Test.java:20) ~[bin/:?]\u000A\u0009at test.Test.main(Test.java:41) [bin/:?]\u000A"}


> Issue : Printing stack trace twice when JSON encoding enabled
> -------------------------------------------------------------
>
>                 Key: LOG4J2-2286
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2286
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.10.0
>            Reporter: hemant budhewar
>            Priority: Major
>
>  
> Description : Steps to reproduce :           
>  
>  # Configure appender.root.layout.pattern = ${ "class": "%c* \{1}*", "data" : "%m%enc\{%xThrowable}{JSON}"}%n
>  # warn("Test Exception", ex);
>  
> Actual Result :
> {class": "Test", "data" : "Test Exception java.lang.RuntimeException: +Heer+\u000A\u0009at test.Test.test(Test.java:20) ~[bin/:?]\u000A\u0009at test.Test.main(Test.java:41) [bin/:?]\u000A"}
> java.lang.RuntimeException: +Heer+
>        at test.Test.test(Test.java:20) ~[bin/:?]
>        at test.Test.main(Test.java:41) [bin/:?]
> Expected result :
> {"class": "Test", "data" : "Test Exception java.lang.RuntimeException: +Heer+\u000A\u0009at test.Test.test(Test.java:20) ~[bin/:?]\u000A\u0009at test.Test.main(Test.java:41) [bin/:?]\u000A"}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)