Log4j 2
  1. Log4j 2
  2. LOG4J2-312

XML layout improvements (compact vs. pretty, namespace, namespace prefix, root element).

    Details

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

      Description

      • The XML root element was “eventSet”, it is now “events”. The word “set” is misleading, because, while unlikely, it is possible that multiple log entries can carry the same timestamp and message.
      • The XML namespace is now includes the log4j version number: http://logging.apache.org/log4j/2.0/events. Previously, it was http://logging.apache.org/log4j/
      • The appender only uses a namespace prefix when needed, that is only for XML fragments, not for well-formed XML, where the default namespace is set to the log4j namespace. This creates much smaller well-formed XML files since no namespace prefixed is used for each element.
      • The namespace prefix is now customizable with “namespacePrefix”, with a default of “log4j”.
      • You can pick between pretty (default) and compact XML (no extra end of lines and indentation). Use compact=”true|false”.
      • Better and updated Javadoc.
      • Updated manual.
      • Use CamelCase for element names, like class names.
      • Use camelCase of attribute names, like instance variables.
      • Add first cut of DTD for XML layout.
      • Add first cut of XSD for XML layout.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Gary Gregory
            Reporter:
            Gary Gregory
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development