You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2013/07/18 00:06:49 UTC
[jira] [Commented] (LOG4J2-312) XML layout improvements (compact
vs. pretty, namespace, namespace prefix, root element).
[ https://issues.apache.org/jira/browse/LOG4J2-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13711699#comment-13711699 ]
Gary Gregory commented on LOG4J2-312:
-------------------------------------
- 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.
- Remove trailing ‘/’ at the end of the namespace.
{noformat}
commit -m "- Use CamelCase for element names, like class names...." (12 paths specified)
Sending C:/vcs/svn/apache/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
Adding C:/vcs/svn/apache/log4j2/trunk/core/src/main/resources/Log4j-events.dtd
Adding C:/vcs/svn/apache/log4j2/trunk/core/src/main/resources/Log4j-events.xsd
Sending C:/vcs/svn/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/XmlCompactFileAppenderTest.java
Adding C:/vcs/svn/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/XmlCompactFileAppenderValidationTest.java
Sending C:/vcs/svn/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/XmlCompleteFileAppenderTest.java
Sending C:/vcs/svn/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/XmlFileAppenderTest.java
Sending C:/vcs/svn/apache/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java
Sending C:/vcs/svn/apache/log4j2/trunk/core/src/test/resources/XmlCompactFileAppenderTest.xml
Adding C:/vcs/svn/apache/log4j2/trunk/core/src/test/resources/XmlCompactFileAppenderValidationTest.xml
Sending C:/vcs/svn/apache/log4j2/trunk/core/src/test/resources/XmlCompleteFileAppenderTest.xml
Sending C:/vcs/svn/apache/log4j2/trunk/core/src/test/resources/XmlFileAppenderTest.xml
Transmitting file data ...
Committed revision 1504299.
{noformat}
> XML layout improvements (compact vs. pretty, namespace, namespace prefix, root element).
> ----------------------------------------------------------------------------------------
>
> Key: LOG4J2-312
> URL: https://issues.apache.org/jira/browse/LOG4J2-312
> Project: Log4j 2
> Issue Type: Improvement
> Components: Layouts
> Affects Versions: 2.0-beta8
> Environment: Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)
> Maven home: C:\Java\apache-maven-3.0.5\bin\..
> Java version: 1.7.0_25, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.7.0_25\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
> Reporter: Gary Gregory
> Assignee: Gary Gregory
> Fix For: 2.0-beta9
>
>
> - 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. 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org