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

ASF GitHub Bot commented on LOG4J2-1838:
----------------------------------------

Github user remkop commented on the issue:

    https://github.com/apache/logging-log4j2/pull/61
  
    Good stuff. I would like to keep this somewhere permanent. Shall we add it 
to CONTRIBUTING.md? Or is somewhere else better?
    
    Sent from my iPhone
    
    > On Mar 8, 2017, at 13:00, Matt Sicker <notificati...@github.com> wrote:
    > 
    > Hey, look at that! I figured out how to properly merge a PR from GitHub 
to Apache.
    > 
    > Instructions for future reference:
    > 
    > git remote add github https://github.com/apache/logging-log4j2.git
    > git fetch github pull/61/head:pr-61
    > git checkout pr-61
    > # make changes
    > git checkout master
    > git merge pr-61
    > Author information is retained this way.
    > 
    > ―
    > You are receiving this because you are subscribed to this thread.
    > Reply to this email directly, view it on GitHub, or mute the thread.
    > 



> 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
>            Assignee: Matt Sicker
>              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&#123;suffix(- %mdc&#123;key&#125;)&#125;}} will 
> append a string generated by pattern {{-&#32;}}  and {{%mdc&#123;key&#125;}}.
> But patterns that handles throwable will be automatically ignored, because 
> they will make the rendered result confusing. So pattern {{%xEx&#123;suffix(- 
> %rEx%mdc&#123;key&#125;)&#125;}} has the same effect with 
> {{%xEx&#123;suffix(- %mdc&#123;key&#125;)&#125;}}, as if the nested {{%rEx}} 
> pattern has never appeared.
> Following is an example of the with such suffix: 
> {code:title=stack trace, with pattern "%xEx&#123;suffix(- 
> %mdc&#123;key&#125;)&#125;" and MDC(key)="test mdc suffix"|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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to