Log4j 2
  1. Log4j 2
  2. LOG4J2-103

Log4jLogEvent proxies ThrowableProxy objects

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta2
    • Fix Version/s: 2.0-beta3
    • Component/s: Core
    • Labels:

      Description

      While verifying LOG4J2-99 I stumbled across another small issue:
      When a Log4jLogEvent is reconstructed (in AsynchAppender, MapRewritePolicy or PropertiesRewritePolicy) the ThrowableProxy of the original LogEvent is used to construct the new Log4JLogEvent.
      There the ThrowableProxy is proxied again. During this the package resolution is repeated (mostly with slightly different result).
      I created a patch for Log4JLogEvent to reuse existing ThrowableProxy objects.

      Best Regards,

      Das

      1. MapRewritePolicyTest.java
        6 kB
        Das Archive
      2. Log4jLogEvent_ThrowableProxy.patch
        0.8 kB
        Das Archive

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3d 13h 27m 1 Ralph Goers 28/Oct/12 23:26
        Ralph Goers made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Ralph Goers [ ralph.goers@dslextreme.com ]
        Fix Version/s 2.0-beta3 [ 12323368 ]
        Resolution Fixed [ 1 ]
        Hide
        Ralph Goers added a comment -

        Very good work! The patch was applied in revision 1403125. Please verify and close.

        Show
        Ralph Goers added a comment - Very good work! The patch was applied in revision 1403125. Please verify and close.
        Das Archive made changes -
        Attachment MapRewritePolicyTest.java [ 12550761 ]
        Hide
        Das Archive added a comment -

        Added the Test-Class (which tests MapRewritePolicy, but found this flaw)

        Show
        Das Archive added a comment - Added the Test-Class (which tests MapRewritePolicy, but found this flaw)
        Das Archive made changes -
        Labels patch testcase
        Das Archive made changes -
        Field Original Value New Value
        Attachment Log4jLogEvent_ThrowableProxy.patch [ 12550760 ]
        Hide
        Das Archive added a comment -

        Added Patch

        Show
        Das Archive added a comment - Added Patch
        Das Archive created issue -

          People

          • Assignee:
            Ralph Goers
            Reporter:
            Das Archive
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development