ceki        01/04/12 17:01:19

  Modified:    .        Makefile
               docs     HISTORY TROUBLESHOOT.html
               src/java/org/apache/log4j PatternLayout.java
               src/java/org/apache/log4j/xml DOMConfigurator.java log4j.dtd
               src/java/org/apache/log4j/xml/test test5.xml
  Log:
  Typo corrections in documentation.
  
  The DOMConfigurator.java  and log4j.dtd have been changed to support the 
<configuration> element.
  It is now "marked" as deprecated.
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-log4j/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/Makefile,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile  2000/12/14 01:46:05     1.1
  +++ Makefile  2001/04/13 00:01:17     1.2
  @@ -2,7 +2,7 @@
   PKG_DIR :=
   DEPTH   :=.
   JSOURCES:=
  -SUBDIRS :=org
  +SUBDIRS :=src
   
   # include master-rule file
   include $(DEPTH)/make/make.inc
  
  
  
  1.28      +3 -4      jakarta-log4j/docs/HISTORY
  
  Index: HISTORY
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/HISTORY,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- HISTORY   2001/04/11 21:38:15     1.27
  +++ HISTORY   2001/04/13 00:01:18     1.28
  @@ -29,6 +29,9 @@
      getOptionString methods have been removed from the OptionHandler
      interface which is implemented by most log4j components. [**]
   
  + - In XML configuration files, the <configuration> element has been
  +   deprecated and was replaced by the <log4j:configuration> element. [*]
  +     
    February 23, 2001
   
    - Release of version 1.1b1
  @@ -39,10 +42,6 @@
      directive.  As a result of this change the disable family of
      methods has moved from the BasicConfigurator class to the Hierarchy
      class. [**]
  -
  - - Changed the name of the configuration element to log4j:configuration in the
  -   log4j.dtd. All configuration files written in XML need to be
  -   modified. [**]
   
      The following perl command can help:
   
  
  
  
  1.4       +3 -2      jakarta-log4j/docs/TROUBLESHOOT.html
  
  Index: TROUBLESHOOT.html
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/TROUBLESHOOT.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TROUBLESHOOT.html 2001/01/25 13:22:22     1.3
  +++ TROUBLESHOOT.html 2001/04/13 00:01:18     1.4
  @@ -52,10 +52,11 @@
   <p>The reason for observing duplicates in log4j output is either due
   to having added the same appender multiple times to the same category
   (typically root) or having added the same appender to different
  -categories not knowing that appenders are inherited cumulatively.
  +categories ignoring the fact that appenders are inherited
  +cumulatively.
   
   <p>log4j does not eliminate appender duplicates. In other words, if
  -you add the same appender to a categoty <i>n</i> times, that appender
  +you add the same appender to a category <i>n</i> times, that appender
   will be invoked <i>n</i> times to append to its target. 
   
   <p>A slightly different cause is adding different appenders all
  
  
  
  1.9       +1 -1      jakarta-log4j/src/java/org/apache/log4j/PatternLayout.java
  
  Index: PatternLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/PatternLayout.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PatternLayout.java        2001/04/03 16:37:09     1.8
  +++ PatternLayout.java        2001/04/13 00:01:18     1.9
  @@ -286,7 +286,7 @@
      data. The value is never truncated.
   
      <p>This behavior can be changed using the <em>maximum field
  -   width</em> modifier which is desginated by a period followed by a
  +   width</em> modifier which is designated by a period followed by a
      decimal constant. If the data item is longer than the maximum
      field, then the extra characters are removed from the
      <em>beginning</em> of the data item and not from the end. For
  
  
  
  1.13      +13 -4     jakarta-log4j/src/java/org/apache/log4j/xml/DOMConfigurator.java
  
  Index: DOMConfigurator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/DOMConfigurator.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DOMConfigurator.java      2001/03/19 12:33:15     1.12
  +++ DOMConfigurator.java      2001/04/13 00:01:18     1.13
  @@ -58,6 +58,7 @@
   public class DOMConfigurator extends BasicConfigurator implements Configurator {
   
     static final String CONFIGURATION_TAG = "log4j:configuration";
  +  static final String OLD_CONFIGURATION_TAG = "configuration";
     static final String RENDERER_TAG      = "renderer";
     static final String APPENDER_TAG   = "appender";
     static final String APPENDER_REF_TAG       = "appender-ref";  
  @@ -592,10 +593,18 @@
     */
     protected
     void parse(Element element, Hierarchy hierarchy) {
  -    
  -    if (!element.getTagName().equals(CONFIGURATION_TAG)) {
  -      LogLog.error("DOM element is not a <"+CONFIGURATION_TAG+"> element.");
  -      return;
  +
  +    String rootElementName = element.getTagName();
  +
  +    if (!rootElementName.equals(CONFIGURATION_TAG)) {
  +      if(rootElementName.equals(OLD_CONFIGURATION_TAG)) {
  +     LogLog.warn("The <"+OLD_CONFIGURATION_TAG+
  +                  "> element has been deprecated.");
  +     LogLog.warn("Use the <"+CONFIGURATION_TAG+"> element instead.");
  +      } else {
  +     LogLog.error("DOM element is - not a <"+CONFIGURATION_TAG+"> element.");
  +     return;
  +      }
       }
   
       String confDebug = subst(element.getAttribute(CONFIG_DEBUG_ATTR));
  
  
  
  1.5       +33 -20    jakarta-log4j/src/java/org/apache/log4j/xml/log4j.dtd
  
  Index: log4j.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/log4j.dtd,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- log4j.dtd 2001/01/22 22:11:37     1.4
  +++ log4j.dtd 2001/04/13 00:01:18     1.5
  @@ -6,34 +6,47 @@
   elements,appender elements, categories and an optional root
   element. -->
   
  -<!ELEMENT logj:configuration (renderer*, appender*,category*,root?)>
  +<!ELEMENT log4j:configuration (renderer*, appender*,category*,root?)>
   
  -<!-- The disable attribute takes a priority value such that all
  -     logging statements with a prioroty equal or below this value are
  -     disabled.
  -
  -     The disableOverride attribute allows the user to override any
  -     BasicConfigurator.disable invocations made from within the
  -     application.
  +<!-- The disable attribute takes a priority value such that all -->
  +<!-- logging statements with a prioroty equal or below this value are -->
  +<!-- disabled. -->
  +
  +<!-- The disableOverride attribute allows the user to override any   -->
  +<!-- BasicConfigurator.disable invocations made from within the      -->
  +<!-- application.                                                    -->
        
  -     By default, disableOverride is "null", meaning that we
  -     do not touch the disable flag.
  +<!-- By default, disableOverride is "null", meaning that we          -->
  +<!-- do not touch the disable flag.                                  -->
        
  -     Setting the configDebug attribute enables the printing of 
  -     internal log4j statements from within configurators.
  +<!-- Setting the configDebug attribute enables the printing of       -->
  +<!-- internal log4j statements from within configurators.            -->
   
  -     By default, configDebug is "null", meaning that we not touch the
  -     configDebug variable.     
  --->
  +<!-- By default, configDebug is "null", meaning that we not touch the -->
  +<!-- the configDebug variable.                                        -->
  +
        
   <!ATTLIST log4j:configuration
     disable                  (debug|info|warn|error|fatal|null)  "null"
     disableOverride          (true|false|null)  "null"
     configDebug              (true|false|null)  "null"
   >
  +
  +
  +<!-- DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED -->
  +<!-- Use "log4j:configuration" above instead of the "configuration" -->
  +<!-- element. -->
  +<!-- DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED -->
  +<!ELEMENT configuration (renderer*, appender*,category*,root?)>
  +<!ATTLIST configuration
  +  disable                  (debug|info|warn|error|fatal|null)  "null"
  +  disableOverride          (true|false|null)  "null"
  +  configDebug              (true|false|null)  "null"
  +>
  +
   
  -<!-- renderer elements allow the user to customize the conversion of
  -message objects to String. -->
  +<!-- renderer elements allow the user to customize the conversion of  -->
  +<!-- message objects to String.                                       -->
   
   <!ELEMENT renderer EMPTY>
   <!ATTLIST renderer
  @@ -43,7 +56,7 @@
   
   <!-- Appenders must have a name and a class. -->
   <!-- Appenders may contain an error handler, a layout, optional parameters -->
  -<!-- and filters. -->
  +<!-- and filters. They may also reference (or include) other appenders. -->
   <!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)>
   <!ATTLIST appender
     name               ID      #REQUIRED
  @@ -63,8 +76,8 @@
   >
   
   
  -<!-- ErrorHandlers can be of any class. They can admit any number of
  -parameters. -->
  +<!-- ErrorHandlers can be of any class. They can admit any number of -->
  +<!-- parameters. -->
   
   <!ELEMENT errorHandler (param*)> 
   <!ATTLIST errorHandler
  
  
  
  1.5       +3 -3      jakarta-log4j/src/java/org/apache/log4j/xml/test/test5.xml
  
  Index: test5.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/test/test5.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- test5.xml 2001/01/17 14:26:58     1.4
  +++ test5.xml 2001/04/13 00:01:18     1.5
  @@ -1,7 +1,7 @@
   <?xml version="1.0" encoding="UTF-8" ?>
  -<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
  +<!DOCTYPE configuration SYSTEM "log4j.dtd">
   
  -<log4j:configuration>
  +<configuration>
   
        <appender name="A1" class="org.apache.log4j.FileAppender">
                   <param name="Append" value="false" />
  @@ -15,4 +15,4 @@
        <root>
             <appender-ref ref="A1" />         
        </root>
  -</log4j:configuration>
  +</configuration>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to