logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1514131 - in /logging/log4j/log4j2/trunk/src/site/xdoc/manual: appenders.xml configuration.xml.vm filters.xml flowtracing.xml lookups.xml migration.xml
Date Thu, 15 Aug 2013 02:15:38 GMT
Author: ggregory
Date: Thu Aug 15 02:15:38 2013
New Revision: 1514131

URL: http://svn.apache.org/r1514131
Log:
[LOG4J2-353] Use consistent conventions in configuration files: Use CamelCase for XML elements
(leave 1.x examples alone).

Modified:
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/filters.xml
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/flowtracing.xml
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/lookups.xml
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/migration.xml

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml?rev=1514131&r1=1514130&r2=1514131&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml Thu Aug 15 02:15:38 2013
@@ -1013,7 +1013,7 @@
     <Console name="STDOUT">
       <PatternLayout pattern="%d [%p] %c %m%n"/>
     </Console>
-  </appenders>
+  </Appenders>
   <Loggers>
     <Logger name="EventLogger" level="info">
       <AppenderRef ref="eventLogger"/>
@@ -1834,7 +1834,7 @@ public class JpaLogEntity extends Abstra
                username="loggingUser" password="abc123" />
     </NoSql>
   </Appenders>
-  <loggers>
+  <Loggers>
     <Root level="warn">
       <AppenderRef ref="databaseAppender"/>
     </Root>

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm?rev=1514131&r1=1514130&r2=1514131&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm Thu Aug 15 02:15:38
2013
@@ -154,16 +154,16 @@ public class Bar {
           <pre class="prettyprint linenums"><![CDATA[
 <?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="WARN">
-  <appenders>
+  <Appenders>
     <Console name="Console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
     </Console>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="Console"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
             Once the file above is placed into the classpath as log4j2.xml you will get results
identical to
             those listed above. Changing the root level to trace will result in results similar
to:
@@ -185,9 +185,9 @@ public class Bar {
           </p>
             <pre class="prettyprint linenums"><![CDATA[
 <logger name="com.foo.Bar" level="TRACE"/>
-<root level="ERROR">
+<Root level="ERROR">
   <AppenderRef ref="STDOUT">
-</root>]]></pre>
+</Root>]]></pre>
           <p>
             With this configuration all log events from <code>com.foo.Bar</code>
will be recorded while only error events will
             be recorded from all other components.
@@ -203,19 +203,19 @@ public class Bar {
           <pre class="prettyprint linenums"><![CDATA[
 <?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="WARN">
-  <appenders>
+  <Appenders>
     <Console name="Console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
     </Console>
-  </appenders>
-  <loggers>
-    <logger name="com.foo.Bar" level="trace">
+  </Appenders>
+  <Loggers>
+    <Logger name="com.foo.Bar" level="trace">
       <AppenderRef ref="Console"/>
-    </logger>
-    <root level="error">
+    </Logger>
+    <Root level="error">
       <AppenderRef ref="Console"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           <p>would result in</p>
              <pre class="prettyprint linenums">
@@ -235,19 +235,19 @@ public class Bar {
           </p>
            <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="WARN">
-  <appenders>
+  <Appenders>
     <Console name="Console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
     </Console>
-  </appenders>
-  <loggers>
-    <logger name="com.foo.Bar" level="trace" additivity="false">
+  </Appenders>
+  <Loggers>
+    <Logger name="com.foo.Bar" level="trace" additivity="false">
       <AppenderRef ref="Console"/>
-    </logger>
-    <root level="error">
+    </Logger>
+    <Root level="error">
       <AppenderRef ref="Console"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           <p>
             Once an event reaches a logger with its additivity set to false the event will
not be passed to
@@ -298,11 +298,11 @@ public class Bar {
 <Configuration advertiser="multicastdns">
 ...
 </Configuration>
-<appenders>
+<Appenders>
   <File name="File1" fileName="target/test.log" bufferedIO="false" advertiseURI="file://path/to/output.log"
advertise="true">
   ...
   </File>
-</appenders>]]></pre>
+</Appenders>]]></pre>
 </subsection>
         <a name="ConfigurationSyntax"/>
         <subsection name="Configuration Syntax">
@@ -390,27 +390,27 @@ public class Bar {
 
           <pre class="prettyprint linenums"><![CDATA[
 <?xml version="1.0" encoding="UTF-8"?>;
-<configuration>
-  <properties>
-    <property name="name1">value</property>
-    <property name="name2" value="value2"/>
-  </properties>
+<Configuration>
+  <Properties>
+    <Property name="name1">value</property>
+    <Property name="name2" value="value2"/>
+  </Properties>
   <]]><i>filter</i>  ... <![CDATA[/>
-  <appenders>
+  <Appenders>
     <]]><i>appender</i> ... <![CDATA[>
       <]]><i>filter</i>  ... <![CDATA[/>
     </]]><i>appender</i><![CDATA[>
     ...
-  </appenders>
-  <loggers>
-    <logger name="name1">
+  </Appenders>
+  <Loggers>
+    <Logger name="name1">
       <]]><i>filter</i>  ... <![CDATA[/>
-    </logger>
+    </Logger>
     ...
-    <root level="level">
+    <Root level="level">
       <AppenderRef ref="name"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           <p>
             See the many examples on this page for sample appender, filter and logger declarations.
@@ -425,27 +425,27 @@ public class Bar {
           </p>
           <pre class="prettyprint linenums"><![CDATA[
 <?xml version="1.0" encoding="UTF-8"?>;
-<configuration>
-  <properties>
-    <property name="name1">value</property>
-    <property name="name2" value="value2"/>
-  </properties>
+<Configuration>
+  <Properties>
+    <Property name="name1">value</property>
+    <Property name="name2" value="value2"/>
+  </Properties>
   <Filter type="type" ... />
-  <appenders>
-    <appender type="type" name="name">
+  <Appenders>
+    <Appender type="type" name="name">
       <Filter type="type" ... />
-    </appender>
+    </Appender>
     ...
-  </appenders>
-  <loggers>
-    <logger name="name1">
+  </Appenders>
+  <Loggers>
+    <Logger name="name1">
       <Filter type="type" ... />
-    </logger>
+    </Logger>
     ...
-    <root level="level">
+    <Root level="level">
       <AppenderRef ref="name"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           <p>
             Below is a sample configuration using the strict format.
@@ -454,51 +454,51 @@ public class Bar {
 <?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="debug" strict="true" name="XMLConfigTest"
                packages="org.apache.logging.log4j.test">
-  <properties>
-    <property name="filename">target/test.log</property>
-  </properties>
+  <Properties>
+    <Property name="filename">target/test.log</Property>
+  </Properties>
   <Filter type="ThresholdFilter" level="trace"/>
 
-  <appenders>
-    <appender type="Console" name="STDOUT">
-      <layout type="PatternLayout" pattern="%m MDC%X%n"/>
-      <filters>
+  <Appenders>
+    <Appender type="Console" name="STDOUT">
+      <Layout type="PatternLayout" pattern="%m MDC%X%n"/>
+      <Filters>
         <Filter type="MarkerFilter" marker="FLOW" onMatch="DENY" onMismatch="NEUTRAL"/>
         <Filter type="MarkerFilter" marker="EXCEPTION" onMatch="DENY" onMismatch="ACCEPT"/>
-      </filters>
-    </appender>
-    <appender type="Console" name="FLOW">
-      <layout type="PatternLayout" pattern="%C{1}.%M %m %ex%n"/><!-- class &
line number -->
-      <filters>
+      </Filters>
+    </Appender>
+    <Appender type="Console" name="FLOW">
+      <Layout type="PatternLayout" pattern="%C{1}.%M %m %ex%n"/><!-- class &
line number -->
+      <Filters>
         <Filter type="MarkerFilter" marker="FLOW" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
         <Filter type="MarkerFilter" marker="EXCEPTION" onMatch="ACCEPT" onMismatch="DENY"/>
-      </filters>
-    </appender>
-    <appender type="File" name="File" fileName="${filename}">
-      <layout type="PatternLayout">
-        <pattern>%d %p %C{1.} [%t] %m%n</pattern>
-      </layout>
-    </appender>
-    <appender type="List" name="List">
-    </appender>
-  </appenders>
+      </Filters>
+    </Appender>
+    <Appender type="File" name="File" fileName="${filename}">
+      <Layout type="PatternLayout">
+        <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
+      </Layout>
+    </Appender>
+    <Appender type="List" name="List">
+    </Appender>
+  </Appenders>
 
-  <loggers>
-    <logger name="org.apache.logging.log4j.test1" level="debug" additivity="false">
+  <Loggers>
+    <Logger name="org.apache.logging.log4j.test1" level="debug" additivity="false">
       <Filter type="ThreadContextMapFilter">
         <KeyValuePair key="test" value="123"/>
-      </filter>
+      </Filter>
       <AppenderRef ref="STDOUT"/>
-    </logger>>
+    </Logger>
 
-    <logger name="org.apache.logging.log4j.test2" level="debug" additivity="false">
+    <Logger name="org.apache.logging.log4j.test2" level="debug" additivity="false">
       <AppenderRef ref="File"/>
-    </logger>>
+    </Logger>
 
-    <root level="trace">
+    <Root level="trace">
       <AppenderRef ref="List"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 
 </Configuration>]]></pre>
         <a name="JSON"/>
@@ -687,12 +687,12 @@ public class Bar {
           </p>
           <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="debug" name="XMLConfigTest" packages="org.apache.logging.log4j.test">
-  <properties>
-    <property name="filename">target/test.log</property>
-  </properties>
+  <Properties>
+    <Property name="filename">target/test.log</Property>
+  </Properties>
   <ThresholdFilter level="trace"/>
 
-  <appenders>
+  <Appenders>
     <Console name="STDOUT">
       <PatternLayout pattern="%m MDC%X%n"/>
     </Console>
@@ -711,30 +711,30 @@ public class Bar {
     </File>
     <List name="List">
     </List>
-  </appenders>
+  </Appenders>
 
-  <loggers>
-    <logger name="org.apache.logging.log4j.test1" level="debug" additivity="false">
+  <Loggers>
+    <Logger name="org.apache.logging.log4j.test1" level="debug" additivity="false">
       <ThreadContextMapFilter>
         <KeyValuePair key="test" value="123"/>
       </ThreadContextMapFilter>
       <AppenderRef ref="STDOUT"/>
-    </logger>>
+    </Logger>
 
-    <logger name="org.apache.logging.log4j.test2" level="debug" additivity="false">
-      <property name="user">${dollar}{sys:user.name}</property>
+    <Logger name="org.apache.logging.log4j.test2" level="debug" additivity="false">
+      <Property name="user">${dollar}{sys:user.name}</Property>
       <AppenderRef ref="File">
         <ThreadContextMapFilter>
           <KeyValuePair key="test" value="123"/>
         </ThreadContextMapFilter>
       </AppenderRef>
       <AppenderRef ref="STDOUT" level="error"/>
-    </logger>>
+    </Logger>
 
-    <root level="trace">
+    <Root level="trace">
       <AppenderRef ref="List"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 
 </Configuration>]]></pre>
         </subsection>
@@ -753,12 +753,12 @@ public class Bar {
           </p>
 <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="debug" name="RoutingTest" packages="org.apache.logging.log4j.test">
-  <properties>
-    <property name="filename">target/rolling1/rollingtest-${dollar}${dollar}{sd:type}.log</property>
-  </properties>
+  <Properties>
+    <Property name="filename">target/rolling1/rollingtest-${dollar}${dollar}{sd:type}.log</Property>
+  </Properties>
   <ThresholdFilter level="debug"/>
 
-  <appenders>
+  <Appenders>
     <Console name="STDOUT">
       <PatternLayout pattern="%m%n"/>
     </Console>
@@ -780,17 +780,17 @@ public class Bar {
         <Route AppenderRef="List" key="Service"/>
       </Routes>
     </Routing>
-  </appenders>
+  </Appenders>
 
-  <loggers>
-    <logger name="EventLogger" level="info" additivity="false">
+  <Loggers>
+    <Logger name="EventLogger" level="info" additivity="false">
       <AppenderRef ref="Routing"/>
-    </logger>
+    </Logger>
 
-    <root level="error">
+    <Root level="error">
       <AppenderRef ref="STDOUT"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 
 </Configuration>]]></pre>
           <p>
@@ -855,10 +855,10 @@ public class Bar {
             by doing:
           </p>
           <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
-  <properties>
-    <property name="type">Audit</property>
-  </properties>
+<Configuration>
+  <Properties>
+    <Property name="type">Audit</property>
+  </Properties>
   ...
 </Configuration>]]></pre>
           <p>
@@ -893,12 +893,12 @@ public class Bar {
 <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>;
 <Configuration status="debug" name="RoutingTest"
                packages="org.apache.logging.log4j.test">
-  <properties>
-    <property name="filename">target/rolling1/rollingtest-${dollar}${dollar}{sd:type}.log</property>
-  </properties>
+  <Properties>
+    <Property name="filename">target/rolling1/rollingtest-${dollar}${dollar}{sd:type}.log</Property>
+  </Properties>
   <ThresholdFilter level="debug"/>
 
-  <appenders>
+  <Appenders>
     <Console name="STDOUT">
       <PatternLayout pattern="%m%n"/>
     </Console>
@@ -920,17 +920,17 @@ public class Bar {
         <Route AppenderRef="List" key="Service"/>
       </Routes>
     </Routing>
-  </appenders>
+  </Appenders>
 
-  <loggers>
-    <logger name="EventLogger" level="info" additivity="false">
+  <Loggers>
+    <Logger name="EventLogger" level="info" additivity="false">
       <AppenderRef ref="Routing"/>
-    </logger>
+    </Logger>
 
-    <root level="error">
+    <Root level="error">
       <AppenderRef ref="STDOUT"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 
 </Configuration>]]></pre>
             During startup this configuration produces:

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/filters.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/filters.xml?rev=1514131&r1=1514130&r2=1514131&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/filters.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/filters.xml Thu Aug 15 02:15:38 2013
@@ -97,7 +97,7 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <BurstFilter level="INFO" rate="16" maxBurst="100"/>
@@ -106,12 +106,12 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>
@@ -127,14 +127,14 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <filters>
+  <Filters>
     <Marker marker="EVENT" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
     <DynamicThresholdFilter key="loginId" defaultThreshold="ERROR"
                             onMatch="ACCEPT" onMismatch="NEUTRAL">
       <KeyValuePair key="User1" value="DEBUG"/>
     </DynamicThresholdFilter>
-  </filters>
-  <appenders>
+  </Filters>
+  <Appenders>
     <File name="Audit" fileName="logs/audit.log">
       <PatternLayout>
         <pattern>%d %p %c{1.} [%t] %m%n</pattern>
@@ -148,15 +148,15 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <logger name="EventLogger" level="info">
+  </Appenders>
+  <Loggers>
+    <Logger name="EventLogger" level="info">
       <AppenderRef ref="Audit"/>
-    </logger>
-    <root level="error">
+    </Logger>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>
@@ -204,11 +204,11 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-    <DynamicThresholdFilter key="loginId" defaultThreshold="ERROR"
-                            onMatch="ACCEPT" onMismatch="NEUTRAL">
-      <KeyValuePair key="User1" value="DEBUG"/>
-    </DynamicThresholdFilter>
-  <appenders>
+  <DynamicThresholdFilter key="loginId" defaultThreshold="ERROR"
+                          onMatch="ACCEPT" onMismatch="NEUTRAL">
+    <KeyValuePair key="User1" value="DEBUG"/>
+  </DynamicThresholdFilter>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <BurstFilter level="INFO" rate="16" maxBurst="100"/>
@@ -217,12 +217,12 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>
@@ -272,7 +272,7 @@
     <KeyValuePair key="eventId" value="Login"/>
     <KeyValuePair key="eventId" value="Logout"/>
   </MapFilter>
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <BurstFilter level="INFO" rate="16" maxBurst="100"/>
@@ -281,12 +281,12 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
           <p>
@@ -295,7 +295,7 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <BurstFilter level="INFO" rate="16" maxBurst="100"/>
@@ -304,17 +304,17 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <MapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
         <KeyValuePair key="eventId" value="Login"/>
         <KeyValuePair key="eventId" value="Logout"/>
       </MapFilter>
       <AppenderRef ref="RollingFile">
       </AppenderRef>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
           <p>
@@ -323,7 +323,7 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <BurstFilter level="INFO" rate="16" maxBurst="100"/>
@@ -332,17 +332,17 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile">
         <MapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
           <KeyValuePair key="eventId" value="Login"/>
           <KeyValuePair key="eventId" value="Logout"/>
         </MapFilter>
       </AppenderRef>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>
@@ -384,7 +384,7 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <MarkerFilter marker="FLOW" onMatch="ACCEPT" onMismatch="DENY"/>
@@ -393,12 +393,12 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>
@@ -444,7 +444,7 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <RegexFilter regex=".* test .*" onMatch="ACCEPT" onMismatch="DENY"/>
@@ -453,12 +453,12 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>
@@ -511,7 +511,7 @@
     <KeyValuePair key="id" value="Login"/>
     <KeyValuePair key="id" value="Logout"/>
   </StructuredDataFilter>
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <BurstFilter level="INFO" rate="16" maxBurst="100"/>
@@ -520,12 +520,12 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>
@@ -575,7 +575,7 @@
     <KeyValuePair key="User1" value="DEBUG"/>
     <KeyValuePair key="User2" value="WARN"/>
   </ThreadContextMapFilter>
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <BurstFilter level="INFO" rate="16" maxBurst="100"/>
@@ -584,19 +584,19 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
           <p>
             The ThreadContextMapFilter can also be applied to a logger for filtering:
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <BurstFilter level="INFO" rate="16" maxBurst="100"/>
@@ -605,16 +605,16 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
       <ThreadContextMapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
         <KeyValuePair key="foo" value="bar"/>
         <KeyValuePair key="User2" value="WARN"/>
       </ThreadContextMapFilter>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>
   ]]></pre>
           </p>
@@ -658,7 +658,7 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <ThresholdFilter level="TRACE" onMatch="ACCEPT" onMismatch="DENY"/>
@@ -667,12 +667,12 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>
@@ -728,7 +728,7 @@
 
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="warn" name="MyApp" packages="">
-  <appenders>
+  <Appenders>
     <RollingFile name="RollingFile" fileName="logs/app.log"
                  filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
       <TimeFilter start="05:00:00" end="05:30:00" onMatch="ACCEPT" onMismatch="DENY"/>
@@ -737,12 +737,12 @@
       </PatternLayout>
       <TimeBasedTriggeringPolicy />
     </RollingFile>
-  </appenders>
-  <loggers>
-    <root level="error">
+  </Appenders>
+  <Loggers>
+    <Root level="error">
       <AppenderRef ref="RollingFile"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </p>
         </subsection>

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/flowtracing.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/flowtracing.xml?rev=1514131&r1=1514130&r2=1514131&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/flowtracing.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/flowtracing.xml Thu Aug 15 02:15:38 2013
@@ -141,7 +141,7 @@ public class App {
 <pre class="prettyprint linenums"><![CDATA[
 <?xml version="1.0" encoding="UTF-8"?>
 <Configuration status="error">
-  <appenders>
+  <Appenders>
     <Console name="Console" target="SYSTEM_OUT">
       <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
       <!-- Flow tracing is most useful with a pattern that shows location.
@@ -151,12 +151,12 @@ public class App {
     <File name="log" fileName="target/test.log" append="false">
       <PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36} %L %M - %msg%xEx%n"/>
     </File>
-  </appenders>
-  <loggers>
-    <root level="trace">
+  </Appenders>
+  <Loggers>
+    <Root level="trace">
       <AppenderRef ref="log"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
             <p>
               Here is the output that results from the Java classes and configuration above.

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/lookups.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/lookups.xml?rev=1514131&r1=1514130&r2=1514131&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/lookups.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/lookups.xml Thu Aug 15 02:15:38 2013
@@ -160,9 +160,9 @@
             defined outside the application it would be quite common to see something like:
           </p>
           <pre class="prettyprint linenums"><![CDATA[
-<appenders>
+<Appenders>
   <File name="ApplicationLog" fileName="${sys:logPath}/app.log"/>
-</appenders>]]></pre>
+</Appenders>]]></pre>
         </subsection>
       </section>
     </body>

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/migration.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/migration.xml?rev=1514131&r1=1514130&r2=1514131&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/migration.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/migration.xml Thu Aug 15 02:15:38 2013
@@ -79,25 +79,25 @@
   <category name="org.apache.log4j.xml">
     <priority value="info" />
   </category>
-  <root>
+  <Root>
     <priority value ="debug" />
-    <AppenderRef ref="STDOUT" />
-  </root>
+    <appender-ref ref="STDOUT" />
+  </Root>
 </log4j:configuration>]]></pre>
             <p>Log4j 2 XML configuration</p>
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
-  <appenders>
+<Configuration>
+  <Appenders>
     <Console name="STDOUT" target="SYSTEM_OUT">
       <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
     </Console>
-  </appenders>
-  <loggers>
+  </Appenders>
+  <Loggers>
     <logger name="org.apache.log4j.xml" level="info"/>
-    <root level="debug">
+    <Root level="debug">
       <AppenderRef ref="STDOUT"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
 
             <h4>Sample 2 - Simple configuration using a File Appender</h4>
@@ -119,33 +119,33 @@
   </appender>
   <category name="org.apache.log4j.xml">
     <priority value="debug" />
-    <AppenderRef ref="A1" />
+    <appender-ref ref="A1" />
   </category>
   <root>
     <priority value ="debug" />
-    <AppenderRef ref="STDOUT" />
+    <appender-ref ref="STDOUT" />
   </root>
 </log4j:configuration>]]></pre>
 
            <p>Log4j 2 XML configuration</p>
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
-  <appenders>
+<Configuration>
+  <Appenders>
     <File name="A1" fileName="A1.log" append="false">
       <PatternLayout pattern="%t %-5p %c{2} - %m%n"/>
     </File>
     <Console name="STDOUT" target="SYSTEM_OUT">
       <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
     </Console>
-  </appenders>
-  <loggers>
+  </Appenders>
+  <Loggers>
     <logger name="org.apache.log4j.xml" level="debug">
       <AppenderRef ref="A1"/>
     </logger>
-    <root level="debug">
+    <Root level="debug">
       <AppenderRef ref="STDOUT"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
 
             <h4>Sample 3 - SocketAppender</h4>
@@ -169,33 +169,33 @@
   </appender>
   <category name="org.apache.log4j.xml">
     <priority value="debug"/>
-    <AppenderRef ref="A1"/>
+    <appender-ref ref="A1"/>
   </category>
   <root>
     <priority value="debug"/>
-    <AppenderRef ref="STDOUT"/>
+    <appender-ref ref="STDOUT"/>
   </root>
 </log4j:configuration>]]></pre>
 
            <p>Log4j 2 XML configuration</p>
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
-  <appenders>
+<Configuration>
+  <Appenders>
     <Socket name="A1" host="localHost" port="5000">
       <SerializedLayout/>
     </Socket>
     <Console name="STDOUT" target="SYSTEM_OUT">
       <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
     </Console>
-  </appenders>
-  <loggers>
+  </Appenders>
+  <Loggers>
     <logger name="org.apache.log4j.xml" level="debug">
       <AppenderRef ref="A1"/>
     </logger>
-    <root level="debug">
+    <Root level="debug">
       <AppenderRef ref="STDOUT"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
 
             <h4>Sample 4 - AsyncAppender</h4>
@@ -204,7 +204,7 @@
 <!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
 <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" configDebug="true">
   <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
-    <AppenderRef ref="TEMP"/>
+    <appender-ref ref="TEMP"/>
   </appender>
   <appender name="TEMP" class="org.apache.log4j.FileAppender">
     <param name="File" value="temp"/>
@@ -214,7 +214,7 @@
   </appender>
   <root>
     <priority value="debug"/>
-    <AppenderRef ref="ASYNC"/>
+    <appender-ref ref="ASYNC"/>
   </root>
 </log4j:configuration>]]></pre>
 
@@ -243,8 +243,8 @@
 <!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
 <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" configDebug="true">
   <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
-    <AppenderRef ref="TEMP"/>
-    <AppenderRef ref="CONSOLE"/>
+    <appender-ref ref="TEMP"/>
+    <appender-ref ref="CONSOLE"/>
   </appender>
   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
     <layout class="org.apache.log4j.PatternLayout">
@@ -259,15 +259,15 @@
   </appender>
   <root>
     <priority value="debug"/>
-    <AppenderRef ref="ASYNC"/>
+    <appender-ref ref="ASYNC"/>
   </root>
 </log4j:configuration>]]></pre>
 
             <p>Log4j 2 XML configuration. Note that the Async Appender should be configured
after the appenders it
               references. This will allow it to shutdown properly.</p>
             <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<configuration status="debug">
-  <appenders>
+<Configuration status="debug">
+  <Appenders>
     <Console name="CONSOLE" target="SYSTEM_OUT">
       <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
     </Console>
@@ -278,12 +278,12 @@
       <AppenderRef ref="TEMP"/>
       <AppenderRef ref="CONSOLE"/>
     </Async>
-  </appenders>
-  <loggers>
-    <root level="debug">
+  </Appenders>
+  <Loggers>
+    <Root level="debug">
       <AppenderRef ref="ASYNC"/>
-    </root>
-  </loggers>
+    </Root>
+  </Loggers>
 </Configuration>]]></pre>
           </subsection>
         </section>



Mime
View raw message