Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-374

Add more options to PatternLayout to display more detailed information about a Throwable

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0-beta9
    • Layouts
    • None

    Description

      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:

      %throwable{className}.%throwable{methodName}:%throwable{lineNumber} %throwable{message}
      

      And we would get this:

      foo.bar.ClassName.main:14 java.lang.ArithmeticException: / by zero
      

      I think we should only modify the ThrowablePatternConverter and ThrowableFormatOptions classes and the documentation. What do you think about it?

      Attachments

        1. LOG4J2-374_v2.patch
          13 kB
          Tibor Benke
        2. LOG4J2-374.patch
          11 kB
          Tibor Benke

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            btibi Tibor Benke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment