Add documentation for log4j-jdk module.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/57008b9f
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/57008b9f
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/57008b9f

Branch: refs/heads/LOG4J2-608
Commit: 57008b9f2349beaad8aea3767b86d710dcbfbb35
Parents: 18015e9
Author: Matt Sicker <[email protected]>
Authored: Mon Sep 1 20:14:09 2014 -0500
Committer: Matt Sicker <[email protected]>
Committed: Mon Sep 1 20:14:09 2014 -0500

----------------------------------------------------------------------
 log4j-jdk/src/site/site.xml       |  52 ++++++++++
 log4j-jdk/src/site/xdoc/index.xml | 168 +++++++++++++++++++++++++++++++++
 2 files changed, 220 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57008b9f/log4j-jdk/src/site/site.xml
----------------------------------------------------------------------
diff --git a/log4j-jdk/src/site/site.xml b/log4j-jdk/src/site/site.xml
new file mode 100644
index 0000000..f8c7307
--- /dev/null
+++ b/log4j-jdk/src/site/site.xml
@@ -0,0 +1,52 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project name="Log4j JDK Logging Adaptor"
+         xmlns="http://maven.apache.org/DECORATION/1.4.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 
http://maven.apache.org/xsd/decoration-1.4.0.xsd";>
+  <body>
+    <links>
+      <item name="Apache" href="http://www.apache.org/"; />
+      <item name="Logging Services" href="http://logging.apache.org/"/>
+      <item name="Log4j" href="../index.html"/>
+    </links>
+
+    <!-- Component-specific reports -->
+    <menu ref="reports"/>
+
+       <!-- Overall Project Info -->
+    <menu name="Log4j Project Information" img="icon-info-sign">
+      <item name="Dependencies" href="../dependencies.html" />
+      <item name="Dependency Convergence" 
href="../dependency-convergence.html" />
+      <item name="Dependency Management" href="../dependency-management.html" 
/>
+      <item name="Project Team" href="../team-list.html" />
+      <item name="Mailing Lists" href="../mail-lists.html" />
+      <item name="Issue Tracking" href="../issue-tracking.html" />
+      <item name="Project License" href="../license.html" />
+      <item name="Source Repository" href="../source-repository.html" />
+      <item name="Project Summary" href="../project-summary.html" />
+    </menu>
+
+    <menu name="Log4j Project Reports" img="icon-cog">
+      <item name="Changes Report" href="../changes-report.html" />
+      <item name="JIRA Report" href="../jira-report.html" />
+      <item name="Surefire Report" href="../surefire-report.html" />
+      <item name="RAT Report" href="../rat-report.html" />
+    </menu>
+  </body>
+</project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57008b9f/log4j-jdk/src/site/xdoc/index.xml
----------------------------------------------------------------------
diff --git a/log4j-jdk/src/site/xdoc/index.xml 
b/log4j-jdk/src/site/xdoc/index.xml
new file mode 100644
index 0000000..0b21372
--- /dev/null
+++ b/log4j-jdk/src/site/xdoc/index.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!DOCTYPE document [<!ENTITY le "&#x2264;">]>
+<document xmlns="http://maven.apache.org/XDOC/2.0";
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 
http://maven.apache.org/xsd/xdoc-2.0.xsd";>
+  <properties>
+    <title>Log4j JDK Logging Adaptor</title>
+    <author email="[email protected]">Matt Sicker</author>
+  </properties>
+  <body>
+    <section name="JDK Logging Adaptor">
+      <p>
+        The JDK Logging Adaptor is a custom implementation of
+        <a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/LogManager.html";>java.util.logging.LogManager</a>
+        that uses <a href="../log4j-core/index.html">Log4j</a>.
+      </p>
+    </section>
+    <section name="Requirements">
+      <p>
+        The JDK Logging Adaptor requires at least Java 6 and is dependent on 
the Log4j API and Log4j Core.
+      </p>
+    </section>
+    <section name="Usage">
+      <p>
+        To use the JDK Logging Adaptor, you must set the system property 
<code>java.util.logging.manager</code> to
+        <a class="javadoc" 
href="apidocs/org/apache/logging/log4j/jdk/LogManager.html">org.apache.logging.log4j.jdk.LogManager</a>
+      </p>
+      <p>
+        This must be done either through the command line (i.e., using the
+        
<code>-Djava.util.logging.manager=org.apache.logging.log4j.jdk.LogManager</code>
 argument) or by using
+        <code>System.setProperty()</code> before any calls are made to 
<code>LogManager</code> or <code>Logger</code>.
+      </p>
+    </section>
+    <section name="Compatibility">
+      <p>
+        The use of a
+        <a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Filter.html";>java.util.logging.Filter</a>
+        is supported on a per-<a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Logger.html";>Logger</a>
+        basis. However, it is recommended to use the standard <a 
href="../manual/filters.html">Filters</a> feature in
+        Log4j instead.
+      </p>
+      <p>
+        The use of
+        <a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Handler.html";>java.util.logging.Handler</a>
+        classes is <em>NOT</em> supported. Custom Handlers should instead use 
an appropriate
+        <a href="../manual/appenders.html">Appender</a> or code their own
+        <a class="javadoc" 
href="../log4j-core/apidocs/org/apache/logging/log4j/core/Appender.html">Appender</a>
+        plugin.
+      </p>
+      <p>
+        Java logging levels are translated into Log4j logging levels 
dynamically. The following table lists the
+        conversions between a Java logging level and its equivalent Log4j 
level.
+      </p>
+      <table>
+        <caption>Level conversions</caption>
+        <thead>
+          <tr>
+            <th>Java Level</th>
+            <th>Level Range</th>
+            <th>Log4j Level</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#OFF";>OFF</a></td>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#MAX_VALUE";>Integer.MAX_VALUE</a></td>
+            <td>OFF</td>
+          </tr>
+          <tr>
+            <td class="muted">n/a</td>
+            <td>1000 &lt; <var>level</var> &lt; <a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#MAX_VALUE";>Integer.MAX_VALUE</a></td>
+            <td>FATAL</td>
+          </tr>
+          <tr>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#SEVERE";>SEVERE</a></td>
+            <td>900 &lt; <var>level</var> &le; 1000</td>
+            <td>ERROR</td>
+          </tr>
+          <tr>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#WARNING";>WARNING</a></td>
+            <td>800 &lt; <var>level</var> &le; 900</td>
+            <td>WARN</td>
+          </tr>
+          <tr>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#INFO";>INFO</a></td>
+            <td>700 &lt; <var>level</var> &le; 800</td>
+            <td>INFO</td>
+          </tr>
+          <tr>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#CONFIG";>CONFIG</a></td>
+            <td>500 &lt; <var>level</var> &le; 700</td>
+            <td>INFO</td>
+          </tr>
+          <tr>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINE";>FINE</a></td>
+            <td>400 &lt; <var>level</var> &le; 500</td>
+            <td>DEBUG</td>
+          </tr>
+          <tr>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINER";>FINER</a></td>
+            <td>300 &lt; <var>level</var> &le; 400</td>
+            <td>DEBUG</td>
+          </tr>
+          <tr>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINEST";>FINEST</a></td>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#MIN_VALUE";>Integer.MIN_VALUE</a>
 &lt; <var>level</var> &le; 300</td>
+            <td>TRACE</td>
+          </tr>
+          <tr>
+            <td>ALL</td>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#MIN_VALUE";>Integer.MIN_VALUE</a></td>
+            <td>ALL</td>
+          </tr>
+        </tbody>
+      </table>
+      <p>
+        There are currently three additional pieces of information obtained 
from each
+        <a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/LogRecord.html";>LogRecord</a>
+        that are stored in the <a 
href="../manual/thread-context.html">ThreadContext</a>.
+      </p>
+      <table>
+        <caption>ThreadContext map keys</caption>
+        <thead>
+          <tr>
+            <th>Key</th>
+            <th><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/LogRecord.html";>LogRecord</a>
 Property</th>
+            <th>Description</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr>
+            <td>log4j.jul.threadID</td>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/LogRecord.html#getThreadID%28%29";>threadID</a></td>
+            <td>An identifier for the thread where the message originated.</td>
+          </tr>
+          <tr>
+            <td>log4j.jul.sequenceNumber</td>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/LogRecord.html#getSequenceNumber%28%29";>sequenceNumber</a></td>
+            <td>A unique, increasing sequence number generated by the 
LogRecord constructor.</td>
+          </tr>
+          <tr>
+            <td>log4j.jul.level</td>
+            <td><a class="javadoc" 
href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/LogRecord.html#getLevel%28%29";>level</a></td>
+            <td>The logging message level name. This level is translated into 
an equivalent Log4j level, so the original
+            logging level name is saved here.</td>
+          </tr>
+        </tbody>
+      </table>
+    </section>
+  </body>
+</document>
\ No newline at end of file

Reply via email to