Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta7
    • Fix Version/s: 2.0-beta8
    • Component/s: Layouts
    • Labels:
      None

      Description

      After an upgrade from version 2.0-beta4 to beta7 the NDCPatternConverter writes an object-ID instead of the content of the NDC-stack.

      We are using an pattern with "[%0.50x]". In beta4 the resulting output looks like "[cbi@CE03178]" which means username and machine. Now in beta7 it looks like "[logging.log4j.spi.MutableThreadContextStack@875ef7]".

      I analysed the issue in NDCPatternConverter.format(...) method, where event.getContextStack() is called and the result is passed to StringBuilder.append(...), which means, that the toString()-method will be invoked.
      In beta4 getContextStack() returns an instance of ImmutableStack. This class inherits its toString() method from AbstractList, where the elements of the collection will be formatted human-readable.
      Now in beta7 there comes an instance of MutableThreadContextStack which isn't derived from AbstractList but implements the Collection-Interface. The toString() method comes from Object and returns the name of the class and an object-ID instead of the context of the unterlying stack/collection.

      In my opinion you just need to copy or derive the toString() method from AbstractList to solve this issue. Thank you in advance!

        Activity

        Christian Bindseil made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Remko Popma made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 2.0-beta8 [ 12324575 ]
        Remko Popma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Remko Popma made changes -
        Field Original Value New Value
        Assignee Remko Popma [ remkop@yahoo.com ]
        Christian Bindseil created issue -

          People

          • Assignee:
            Remko Popma
            Reporter:
            Christian Bindseil
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.25h
              0.25h
              Remaining:
              Remaining Estimate - 0.25h
              0.25h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development