logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1184893 - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: pom.xml src/site/resources/images/Log4jClasses.jpg src/site/xdoc/manual/architecture.xml
Date Sun, 16 Oct 2011 18:07:13 GMT
Author: rgoers
Date: Sun Oct 16 18:07:13 2011
New Revision: 1184893

URL: http://svn.apache.org/viewvc?rev=1184893&view=rev
Log:
Start the architecture doc

Added:
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/images/Log4jClasses.jpg
  (with props)
Modified:
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/pom.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/xdoc/manual/architecture.xml

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/pom.xml?rev=1184893&r1=1184892&r2=1184893&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/pom.xml (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/pom.xml Sun Oct 16 18:07:13 2011
@@ -239,7 +239,7 @@
     </snapshotRepository>
     <site>
       <id>apache.website</id>
-      <url>scp://people.apache.org/www/logging.apache.org/log4j2</url>
+      <url>scp://people.apache.org/www/logging.apache.org/log4j/2.0</url>
     </site>
   </distributionManagement>
   <modules>

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/images/Log4jClasses.jpg
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/images/Log4jClasses.jpg?rev=1184893&view=auto
==============================================================================
Binary file - no diff available.

Propchange: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/images/Log4jClasses.jpg
------------------------------------------------------------------------------
    svn:executable = *

Propchange: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/images/Log4jClasses.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/xdoc/manual/architecture.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/xdoc/manual/architecture.xml?rev=1184893&r1=1184892&r2=1184893&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/xdoc/manual/architecture.xml
(original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/xdoc/manual/architecture.xml
Sun Oct 16 18:07:13 2011
@@ -24,6 +24,85 @@
 
     <body>
       <section name="Architecture">
+        <subsection name="Main Components">
+          <p>Log4j uses the classes shown in the diagram below.</p>
+          <img src="../images/Log4jClasses.jpg" title="Log4j 2.0 Class Relationships"
+              caption="Log4j 2.0 Class Relationships"/>
+          <p>Applications using the Log4j 2.0 API will request a Logger with a specific
name from the
+          LogManager. The LogManager will locate the appropriate LoggerContext and then obtain
the Logger from it.
+          If the Logger must be created it will be associated with the LoggerConfig that
contains either a) the
+          same name as the Logger, b) the name of a parent package, or c) the root LoggerConfig.
LoggerConfig
+          objects are created from Logger declarations in the configuration. The LoggerConfig
is associated with
+          the Appenders that actually deliver the LogEvents.</p>
+          <h4>Logger Hierarchy</h4>
+            <p>The first and foremost advantage of any logging API over plain
+              <code>System.out.println</code> resides in its ability to disable
+              certain log statements while allowing others to print unhindered. This
+              capability assumes that the logging space, that is, the space of all
+              possible logging statements, is categorized according to some
+              developer-chosen criteria.
+            </p>
+            <p>In Log4j 1.x the Logger Hierarchy was maintained through a relationship
between Loggers.
+              In Log4j 2.0 this relationship no longers exists. Instead, the hierarchy is
maintained
+              in the relationship between LoggerConfig objects.
+            </p>
+
+            <p>Loggers and LoggerConfigs are named entities. Logger names are case-sensitive
and
+              they follow the hierarchical naming rule:
+            </p>
+
+            <p>
+            <table bgcolor="#EEEE99">
+              <tr>
+                <td>
+                  <dl>
+                    <dt><b>Named Hierarchy</b></dt>
+
+                    <dd>A LoggerConfig is said to be an <em>ancestor</em>
of another
+                        LoggerConfig if its name followed by a dot is a prefix of the
+                       <em>descendant</em> logger name. A LoggerConfig is said
to be a
+                       <em>parent</em> of a <em>child</em> LoggerConfig
if there are no
+                       ancestors between itself and the descendant LoggerConfig.
+                    </dd>
+                  </dl>
+                </td>
+              </tr>
+            </table>
+            </p>
+            <p>For example, the LoggerConfig named <code>"com.foo"</code>
is a parent
+              of the LoggerConfig named <code>"com.foo.Bar"</code>.  Similarly,
+              <code>"java"</code> is a parent of <code>"java.util"</code>
and an
+              ancestor of <code>"java.util.Vector"</code>.  This naming scheme
+              should be familiar to most developers.
+            </p>
+
+            <p>The root logger resides at the top of the logger hierarchy. It
+               is exceptional in two ways:
+
+              <ol>
+                <li> it always exists,</li>
+                <li> it does not have a name.</li>
+              </ol>
+            </p>
+          <h4>LoggerContext</h4>
+
+          <h4>Configuration</h4>
+
+          <h4>Logger</h4>
+
+            <h5>Log Levels</h5>
+
+          <h4>LoggerConfig</h4>
+
+          <h4>Filter</h4>
+
+          <h4>Appender</h4>
+
+          <h4>Layout</h4>
+
+          <h4>StrSubstitutor and StrLookup</h4>
+
+        </subsection>
 
       </section>
     </body>



Mime
View raw message