logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-374) Add more options to PatternLayout to display more detailed information about a Throwable
Date Tue, 03 Sep 2013 14:58:55 GMT

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

Gary Gregory edited comment on LOG4J2-374 at 9/3/13 2:57 PM:
-------------------------------------------------------------

Patch applied with a few changes.

Thank you Tibor!

{noformat}
commit -m "[LOG4J2-374] Add more options to PatternLayout to display more detailed information
about a Throwable." C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java
C:/vcs/svn/apache/log4j2/trunk/src/changes/changes.xml C:/vcs/svn/apache/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm
C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java
C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java
    Sending        C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java
    Sending        C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java
    Adding         C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java
    Sending        C:/vcs/svn/apache/log4j2/trunk/src/changes/changes.xml
    Sending        C:/vcs/svn/apache/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm
    Transmitting file data ...
    Committed revision 1519707.
{noformat}
                
      was (Author: garydgregory):
    Patch applied with a few changes.
{noformat}
commit -m "[LOG4J2-374] Add more options to PatternLayout to display more detailed information
about a Throwable." C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java
C:/vcs/svn/apache/log4j2/trunk/src/changes/changes.xml C:/vcs/svn/apache/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm
C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java
C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java
    Sending        C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java
    Sending        C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java
    Adding         C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java
    Sending        C:/vcs/svn/apache/log4j2/trunk/src/changes/changes.xml
    Sending        C:/vcs/svn/apache/log4j2/trunk/src/site/xdoc/manual/layouts.xml.vm
    Transmitting file data ...
    Committed revision 1519707.
{noformat}
                  
> Add more options to PatternLayout to display more detailed information about a Throwable
> ----------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-374
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-374
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Layouts
>    Affects Versions: 2.0-beta9
>            Reporter: Tibor Benke
>         Attachments: LOG4J2-374.patch, LOG4J2-374_v2.patch
>
>
> That would be useful if we got more details about the method which threw the exception.
There is a "short" form, which contains these information, but there can be some cases, when
we need them separately.
> For example we would write something like this:
> {noformat}
> %throwable{className}.%throwable{methodName}:%throwable{lineNumber} %throwable{message}
> {noformat}
> And we would get this:
> {noformat}
> foo.bar.ClassName.main:14 java.lang.ArithmeticException: / by zero
> {noformat}
> I think we should only modify the ThrowablePatternConverter and ThrowableFormatOptions
classes and the documentation. What do you think about it?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message