Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E821E200C2E for ; Sun, 5 Mar 2017 19:07:38 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E29ED160B6B; Sun, 5 Mar 2017 18:07:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 130DB160B57 for ; Sun, 5 Mar 2017 19:07:37 +0100 (CET) Received: (qmail 89730 invoked by uid 500); 5 Mar 2017 18:07:37 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 89720 invoked by uid 99); 5 Mar 2017 18:07:37 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Mar 2017 18:07:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BD750C191B for ; Sun, 5 Mar 2017 18:07:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.547 X-Spam-Level: X-Spam-Status: No, score=-1.547 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id YrlcS31b7cIg for ; Sun, 5 Mar 2017 18:07:35 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 731755F479 for ; Sun, 5 Mar 2017 18:07:34 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 1D0F1E00B4 for ; Sun, 5 Mar 2017 18:07:33 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C5F0B21D62 for ; Sun, 5 Mar 2017 18:07:32 +0000 (UTC) Date: Sun, 5 Mar 2017 18:07:32 +0000 (UTC) From: "Zilong Song (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LOG4J2-1838) Add support for appending common suffix to each line of throwable stack trace MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 05 Mar 2017 18:07:39 -0000 [ https://issues.apache.org/jira/browse/LOG4J2-1838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Zilong Song updated LOG4J2-1838: -------------------------------- Description: Add support for appending common suffix to each line of throwable stack trace. The suffix can be configured by patterns just like patterns used elsewhere. For example, pattern {{%xEx\{suffix(- %mdc\{key\})\}}} will append a string generated by pattern {{- }} and pattern {{%mdc\{key\} }}. But throwable patterns will be automatically ignored, because they will make the rendered result confusing. So pattern {{%xEx\{suffix(- %rEx%mdc\{key\})\}}} has the same effect with {{%xEx\{suffix(- %mdc\{key\})\}}}, as if the nested {{%rEx}} pattern has never appeared. With the common suffix, the stack trace is as following: (with pattern {{suffix(- %mdc\{key\})}}, and MDC value {{test mdc suffix}} to {{key}}) {code:title=stack trace|borderStyle=solid} java.lang.IllegalArgumentException: IllegalArgument - test mdc suffix at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverterTest.testSuffixFromNormalPattern(ExtendedThrowablePatternConverterTest.java:48) [test-classes/:?] - test mdc suffix at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] - test mdc suffix at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] - test mdc suffix at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] - test mdc suffix at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:?] - test mdc suffix Caused by: java.lang.NullPointerException: null pointer - test mdc suffix at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverterTest.testSuffixFromNormalPattern(ExtendedThrowablePatternConverterTest.java:47) ~[test-classes/:?] - test mdc suffix ... 27 more - test mdc suffix }} {code} was: Add support for appending common suffix to each line of throwable stack trace. The suffix can be configured by patterns just like patterns used elsewhere. For example, pattern {{%xEx\{suffix(- %mdc\{key\})\}}} will append a string generated by pattern {{- }} and pattern {{%mdc\{key\} }}. But throwable patterns will be automatically ignored, because they will make the rendered result confusing. So pattern {{%xEx\{suffix(- %rEx%mdc\{key\})\}}} has the same effect with {{%xEx\{suffix(- %mdc\{key\})\}}}, as if the nested {{%rEx}} has never appeared. With the common suffix, the stack trace is as following: (with pattern {{suffix(- %mdc\{key\})}}, and MDC value {{test mdc suffix}} to {{key}}) {code:title=stack trace|borderStyle=solid} java.lang.IllegalArgumentException: IllegalArgument - test mdc suffix at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverterTest.testSuffixFromNormalPattern(ExtendedThrowablePatternConverterTest.java:48) [test-classes/:?] - test mdc suffix at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] - test mdc suffix at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] - test mdc suffix at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] - test mdc suffix at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:?] - test mdc suffix Caused by: java.lang.NullPointerException: null pointer - test mdc suffix at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverterTest.testSuffixFromNormalPattern(ExtendedThrowablePatternConverterTest.java:47) ~[test-classes/:?] - test mdc suffix ... 27 more - test mdc suffix }} {code} > Add support for appending common suffix to each line of throwable stack trace > ----------------------------------------------------------------------------- > > Key: LOG4J2-1838 > URL: https://issues.apache.org/jira/browse/LOG4J2-1838 > Project: Log4j 2 > Issue Type: New Feature > Components: Pattern Converters > Affects Versions: 2.8.1 > Reporter: Zilong Song > Labels: features > Fix For: 2.8.2 > > > Add support for appending common suffix to each line of throwable stack trace. The suffix can be configured by patterns just like patterns used elsewhere. > For example, pattern {{%xEx\{suffix(- %mdc\{key\})\}}} will append a string generated by pattern {{- }} and pattern {{%mdc\{key\} }}. > But throwable patterns will be automatically ignored, because they will make the rendered result confusing. So pattern {{%xEx\{suffix(- %rEx%mdc\{key\})\}}} has the same effect with {{%xEx\{suffix(- %mdc\{key\})\}}}, as if the nested {{%rEx}} pattern has never appeared. > With the common suffix, the stack trace is as following: (with pattern {{suffix(- %mdc\{key\})}}, and MDC value {{test mdc suffix}} to {{key}}) > {code:title=stack trace|borderStyle=solid} > java.lang.IllegalArgumentException: IllegalArgument - test mdc suffix > at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverterTest.testSuffixFromNormalPattern(ExtendedThrowablePatternConverterTest.java:48) [test-classes/:?] - test mdc suffix > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] - test mdc suffix > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] - test mdc suffix > at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] - test mdc suffix > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:?] - test mdc suffix > Caused by: java.lang.NullPointerException: null pointer - test mdc suffix > at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverterTest.testSuffixFromNormalPattern(ExtendedThrowablePatternConverterTest.java:47) ~[test-classes/:?] - test mdc suffix > ... 27 more - test mdc suffix > }} > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org