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 07:13:00 UTC

[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=16415129#comment-16415129 ] 

hemant budhewar edited comment on LOG4J2-2286 at 3/27/18 7:12 AM:
------------------------------------------------------------------

after usage of {{alwaysWriteExceptions = false, this issue is not observed anymore.}}


was (Author: hemantbudhewar):
after usage of {{alwaysWriteExceptions = false, this issue is observed anymore.}}

> 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)