You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-cvs@jakarta.apache.org by ce...@apache.org on 2001/11/30 00:25:34 UTC

cvs commit: jakarta-log4j/src/java/org/apache/log4j PropertyConfigurator.java

ceki        01/11/29 15:25:34

  Modified:    src/docbook configuration.xml manual.xml
               src/java/org/apache/log4j PropertyConfigurator.java
  Log:
  enhanced docs
  
  Revision  Changes    Path
  1.19      +17 -8     jakarta-log4j/src/docbook/configuration.xml
  
  Index: configuration.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/docbook/configuration.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- configuration.xml	2001/11/29 20:35:00	1.18
  +++ configuration.xml	2001/11/29 23:25:34	1.19
  @@ -217,7 +217,9 @@
       <para>As mention previously, log4j also supports configuration
       files written in XML. These configuration files are parsed with
       <ulink
  -    url="../api/org/apache/log4j/xml/DOMConfigurator.html">org.apache.log4j.xml.DOMConfigurator</ulink>. Here is how.
  +    url="../api/org/apache/log4j/xml/DOMConfigurator.html">org.apache.log4j.xml.DOMConfigurator</ulink>
  +    which is invoked in a similar fashion to the
  +    <classname>PropertyConfigurator</classname>.
       </para>
       
       <para>
  @@ -226,7 +228,7 @@
    import com.foo.Bar;
   
    import org.apache.log4j.Logger;
  - <emphasis role="strong">import org.apache.log4j.xml.DOMConfigurator;</emphasis>
  + <emphasis role="bold">import org.apache.log4j.xml.DOMConfigurator;</emphasis>
    
    public class MyApp3 {
   
  @@ -234,7 +236,7 @@
   
      public static void main(String[] args) {
        
  -     DOMConfigurator.configure(args[0]);
  +     <emphasis role="bold">DOMConfigurator.configure(args[0]);</emphasis>
   
        cat.info("Entering application.");
        Bar bar = new Bar();
  @@ -245,6 +247,10 @@
       </programlisting>
     </para>
       
  +    <para>The following XML configuration file equivalent to the previous
  +      examples.
  +    </para>
  +
       <para>
         <example><title>Equivalent configuration file in XML</title>
         <screen>
  @@ -255,8 +261,7 @@
   
   	&lt;appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
              &lt;layout class="org.apache.log4j.PatternLayout">
  -             &lt;param name="ConversionPattern"
  -		    value="=%-4r [%t] %-5p %c %x - %m%n"/>
  +             &lt;param name="ConversionPattern" value="=%-4r [%t] %-5p %c %x - %m%n"/>
              &lt;/layout>	    
   	&lt;/appender>
   	
  @@ -268,11 +273,15 @@
   &lt;/log4j:configuration>
   
         </screen>
  -      </example>
  -    </para>
  +	</example>
  +      </para>
   
       
  -    <para></para>
  +      <para>Note that the <file>log4j.dtd</file> does not need to be
  +	placed in the same directory as the XML file. In fact, it does
  +	not need to be placed anywhere. The log4j.dtd is extracted
  +	from log4j.jar and handed to the XML parser.
  +      </para>
     </sect1>
   
     <!-- ================================================================ -->
  
  
  
  1.17      +1 -1      jakarta-log4j/src/docbook/manual.xml
  
  Index: manual.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/docbook/manual.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- manual.xml	2001/11/22 21:03:41	1.16
  +++ manual.xml	2001/11/29 23:25:34	1.17
  @@ -36,7 +36,7 @@
     </bookinfo>
     
     &intro;  
  -  &architecture;  
  +  &architecture; 
     &conf;
     &defaultInit;
     &wider;
  
  
  
  1.46      +23 -14    jakarta-log4j/src/java/org/apache/log4j/PropertyConfigurator.java
  
  Index: PropertyConfigurator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/PropertyConfigurator.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- PropertyConfigurator.java	2001/10/01 21:16:37	1.45
  +++ PropertyConfigurator.java	2001/11/29 23:25:34	1.46
  @@ -113,6 +113,23 @@
       <code>key=value</code>. The syntax of different configuration
       elements are discussed below.
   
  +    <h3>Repository-wide threshold</h3>
  +    
  +    <p>The repository-wide threshold filters logging requests by level
  +    regardless of logger. The syntax is:
  +
  +    <pre>
  +    log4j.threshold=[level]
  +    </pre>
  +
  +    <p>The level value can consist of the string values OFF, FATAL,
  +    ERROR, WARN, INFO, DEBUG, ALL or a <em>custom level</e> value. A
  +    custom level value can be specified in the form
  +    level#classname. By default the repository-wide threshold is set
  +    to the lowest possible value, namely the level <code>ALL</code>.
  +    </p>
  +   
  +
       <h3>Appender configuration</h3>
   
       <p>Appender configuration syntax is:
  @@ -146,10 +163,10 @@
       <p>This syntax means that an optional <em>level</em> can be
       supplied followed by appender names separated by commas.
   
  -    <p>The level value can consist of the string values FATAL,
  -    ERROR, WARN, INFO, DEBUG or a <em>custom level</em> value. A
  +    <p>The level value can consist of the string values OFF, FATAL,
  +    ERROR, WARN, INFO, DEBUG, ALL or a <em>custom level</em> value. A
       custom level value can be specified in the form
  -    <code>level#classname</code>. 
  +    <code>level#classname</code>.
       
       <p>If a level value is specified, then the root level is set
       to the corresponding level.  If no level value is specified,
  @@ -203,19 +220,11 @@
       <pre>
       log4j.renderer.my.Fruit=my.FruitRenderer
       </pre>
  -
  -    <h3>Class Factories</h3>
   
  -    In case you are using your own subtypes of the
  -    <code>Logger</code> class and wish to use configuration files,
  -    then you <em>must</em> set the <code>loggerFactory</code> for
  -    the subtype that you are using.
  -    
  -    <p>The syntax is:
  +    <h3>Logger Factories</h3>
   
  -    <pre>
  -    log4j.loggerFactory=fully.qualified.name.of.loggerFactory.class
  -    </pre>
  +    The usage of custom logger factories is discouraged and no longer
  +    documented.
   
       <h3>Example</h3>
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>