Log4j 2
  1. Log4j 2
  2. LOG4J2-447

XMLLayout does not include marker name

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta9
    • Fix Version/s: 2.0-rc1
    • Component/s: Layouts
    • Labels:
      None

      Description

      Log4j2 supports the notion of markers, but this is not represented by the XMLLayout.

      For example, using SerializedLayout with SocketAppender will send marker information, but using XMLLayout with SocketAppender will not.

      It would be very helpful to have just the name of the leaf marker sent with the log event, not the corresponding marker hierarchy.

        Activity

        Hide
        Gary Gregory added a comment -

        Thank you for the patch!

        commit -m "[LOG4J2-447] XMLLayout does not include marker name. Apply patch with changes, and also adjust layout documentation to fix element name casing." (6 paths specified)
            Sending        C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
            Sending        C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/resources/Log4j-events.dtd
            Sending        C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/resources/Log4j-events.xsd
            Sending        C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.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 1545905.
        
        Show
        Gary Gregory added a comment - Thank you for the patch! commit -m "[LOG4J2-447] XMLLayout does not include marker name. Apply patch with changes, and also adjust layout documentation to fix element name casing." (6 paths specified) Sending C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java Sending C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/resources/Log4j-events.dtd Sending C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/main/resources/Log4j-events.xsd Sending C:/vcs/svn/apache/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.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 1545905.
        Hide
        Mark Paluch added a comment -

        Hamcrest is transitive. Rewrote the test, added documentation and updated DTD+XSD

        Show
        Mark Paluch added a comment - Hamcrest is transitive. Rewrote the test, added documentation and updated DTD+XSD
        Hide
        Scott Deboy added a comment -

        I don't think we already have a hamcrest dependency in our tests.

        Would also need to document that the XMLlayout includes just the leaf marker name but not the hierarchy..

        Show
        Scott Deboy added a comment - I don't think we already have a hamcrest dependency in our tests. Would also need to document that the XMLlayout includes just the leaf marker name but not the hierarchy..
        Hide
        Mark Paluch added a comment -

        Patch attached, added <Marker>Marker-Name</Marker> or <Marker parent="name of parent marker">Child Marker</Marker> to XMLLayout

        Show
        Mark Paluch added a comment - Patch attached, added <Marker>Marker-Name</Marker> or <Marker parent="name of parent marker">Child Marker</Marker> to XMLLayout

          People

          • Assignee:
            Unassigned
            Reporter:
            Jeff Hudren
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development