Log4j 2
  1. Log4j 2
  2. LOG4J2-99

MapRewritePolicy always behaves like mode "Add"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta2
    • Fix Version/s: 2.0-beta3
    • Component/s: Appenders
    • Labels:

      Description

      Hello!

      The "rewrite" method of org.apache.logging.log4j.core.appender.rewrite.MapRewritePolicy always calls
      newMap.putAll(map);

      which causes the mode "Update" to also behave like mode "Add".

      Best Regards,

      Das

        Activity

        Das Archive made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Das Archive added a comment -

        Verified

        Show
        Das Archive added a comment - Verified
        Ralph Goers made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0-beta3 [ 12323368 ]
        Resolution Fixed [ 1 ]
        Hide
        Ralph Goers added a comment -

        Thanks for the patch! It was applied in revision 1400243. Please verify and close.

        Show
        Ralph Goers added a comment - Thanks for the patch! It was applied in revision 1400243. Please verify and close.
        Das Archive made changes -
        Description The "rewrite" method of org.apache.logging.log4j.core.appender.rewrite.MapRewritePolicy always calls
        newMap.putAll(map);

        which causes the mode "Update" to also behave like mode "Add".
        Hello!

        The "rewrite" method of org.apache.logging.log4j.core.appender.rewrite.MapRewritePolicy always calls
        newMap.putAll(map);

        which causes the mode "Update" to also behave like mode "Add".

        Best Regards,

        Das
        Das Archive made changes -
        Attachment allow_log_event_subclass_serialization.patch [ 12549315 ]
        Das Archive made changes -
        Comment [ Added the patch ]
        Das Archive made changes -
        Attachment allow_log_event_subclass_serialization.patch [ 12549315 ]
        Das Archive made changes -
        Field Original Value New Value
        Attachment MapRewritePolicy.patch [ 12549304 ]
        Hide
        Das Archive added a comment -

        Added patch to fix the issue

        Show
        Das Archive added a comment - Added patch to fix the issue
        Das Archive created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5m
              5m
              Remaining:
              Remaining Estimate - 5m
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development