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/01/19 17:45:44 UTC

cvs commit: jakarta-log4j/org/apache/log4j/xml/test Makefile SubClassTest.java TCategory.java TPriority.java

ceki        01/01/19 08:45:44

  Modified:    doc      HISTORY
               org/apache/log4j Category.java Priority.java
               org/apache/log4j/spi LoggingEvent.java
               org/apache/log4j/test Makefile ShortSocketServer.java
               org/apache/log4j/test/xml asyncTest.xml
                        stressAsyncAppender.xml
               org/apache/log4j/xml/examples XCategory.java XPriority.java
                        extension1.xml extension2.xml sample1.xml
                        sample2.xml sample3.xml sample4.xml
               org/apache/log4j/xml/test Makefile SubClassTest.java
  Removed:     org/apache/log4j/xml/test TCategory.java TPriority.java
  Log:
  Updated Category.java to use ClassLoader.getSystemResource in its static initializer.
  This is much better than the silly stuff we did before.
  
  LoggingEvent now supports serialization of priorities derived from org.apache.log4j.Priority.
  
  Revision  Changes    Path
  1.7       +9 -2      jakarta-log4j/doc/HISTORY
  
  Index: HISTORY
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/doc/HISTORY,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HISTORY	2001/01/18 07:49:39	1.6
  +++ HISTORY	2001/01/19 16:45:26	1.7
  @@ -10,17 +10,24 @@
   
    - Release of version 1.1 (the 21st major release)
   
  + - Improved the seach method for searching for the "log4j.properties" file in
  +   the static initializer of Category class. Thanks to Calvin Chan for
  +   supplying a better method. [*]
  +
  + - The LoggingEvent class now supports serialization of priorities
  +   derived from the org.apache.log4j.Priority 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:
   
  -   > perl -p -i.bak -e "s/configuration/log4j:configuration/;" file1.xml .. fileN.xml
  +   perl -p -i.bak -e "s/configuration/log4j:configuration/;" file1.xml .. fileN.xml
      
   
    - Fixed the errouneously thrown IOInterruptedException when the AsyncAppender 
  -   was closed. [*]
  +   was closed. Thanks to Tom Palmer for accurately reporting this bug. [*]
   
    January 12th, 2001
   
  
  
  
  1.13      +11 -13    jakarta-log4j/org/apache/log4j/Category.java
  
  Index: Category.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/Category.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Category.java	2001/01/17 09:28:54	1.12
  +++ Category.java	2001/01/19 16:45:27	1.13
  @@ -14,6 +14,7 @@
   //              Ciaran Treanor <ci...@xelector.com>
   //              Jeff Turner <je...@socialchange.net.au>
   //              Horwitz, Michael <MH...@siemens.co.za>
  +//              Calvin Chan <ca...@hic.gov.au>
   
   package org.apache.log4j;
   
  @@ -53,7 +54,7 @@
     // DISABLE_OFF should be set to a value lower than all possible
     // priorities.
     static final int DISABLE_OFF = -1;
  -  static final int DISABLE_OVERRIDE = -21;
  +  static final int DISABLE_OVERRIDE = -2;
     
     private static String DEFAULT_FQN = "org.apache.log4j.Category";
   
  @@ -125,29 +126,26 @@
     /** Search for the properties file log4j.properties in the CLASSPATH.  */
     static {
   
  -    String override = OptionConverter.getSystemProperty(DEFAULT_INIT_OVERRIDE_KEY,
  -							null);
  +    String override =OptionConverter.getSystemProperty(DEFAULT_INIT_OVERRIDE_KEY,
  +						       null);
   
       // if there is no default init override, them get the resource
       // specified by the user or the default config file.
       if(override == null || "false".equalsIgnoreCase(override)) {
         String resource = OptionConverter.getSystemProperty(
  -                                                      DEFAULT_CONFIGURATION_KEY, 
  -						      DEFAULT_CONFIGURATION_FILE);
  +                                                   DEFAULT_CONFIGURATION_KEY, 
  +						   DEFAULT_CONFIGURATION_FILE);
         URL url = null;
         try {
   	url = new URL(resource);
         } catch (MalformedURLException ex) {
  +
   	// so, resource is not a URL:
  -	// attempt to get the resource in the most generic way:
  -	url = Category.class.getResource(resource);
  +	// attempt to get the resource from the class path
  +	url = ClassLoader.getSystemResource(resource);
   	if(url == null) {
  -	  // if that doen't work, then try again in a slightly
  -	  // different way
  -	  ClassLoader loader = Category.class.getClassLoader();
  -	  if(loader != null) {
  -	    url = loader.getResource(resource);	  
  -	  }
  +	  // Is it under org/apache/log4j somewhere in the classpath?
  +	  url = Category.class.getResource(resource);
   	}	
         }	
         
  
  
  
  1.5       +2 -2      jakarta-log4j/org/apache/log4j/Priority.java
  
  Index: Priority.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/Priority.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Priority.java	2001/01/17 09:28:54	1.4
  +++ Priority.java	2001/01/19 16:45:28	1.5
  @@ -50,13 +50,13 @@
        The <code>INFO</code> priority designates informational messages
        that highlight the progress of the application at coarse-grained
        level.  */
  -  final static public Priority INFO  = new Priority(INFO_INT, "INFO",  5);
  +  final static public Priority INFO  = new Priority(INFO_INT, "INFO",  6);
   
     /**
        The <code>DEBUG</code> priority designates fine-grained
        informational events that are most useful to debug an
        application.  */
  -  final static public Priority DEBUG = new Priority(DEBUG_INT, "DEBUG", 6);
  +  final static public Priority DEBUG = new Priority(DEBUG_INT, "DEBUG", 7);
   
     
     /**
  
  
  
  1.3       +54 -3     jakarta-log4j/org/apache/log4j/spi/LoggingEvent.java
  
  Index: LoggingEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/spi/LoggingEvent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LoggingEvent.java	2000/12/14 21:08:10	1.2
  +++ LoggingEvent.java	2001/01/19 16:45:29	1.3
  @@ -15,9 +15,10 @@
   
   import java.io.StringWriter;
   import java.io.PrintWriter;
  -
  +import java.lang.reflect.Method;
   import java.io.ObjectOutputStream;
   import java.io.ObjectInputStream;
  +import java.util.Hashtable;
   
   // Contributors:   Nelson Minar <ne...@monkey.org>
   //                 Wolf Siberski
  @@ -91,6 +92,11 @@
     // Damn serialization
     static final long serialVersionUID = -868428216207166145L;
   
  +  static final Integer[] PARAM_ARRAY = new Integer[1];
  +  static final String TO_PRIORITY = "toPriority";
  +  static final Class[] TO_PRIORITY_PARAMS = new Class[] {int.class};
  +  static final Hashtable methodCache = new Hashtable(3);
  +
     /**
        Instantiate a LoggingEvent from the supplied parameters.
        
  @@ -168,13 +174,58 @@
       this.getThrowableInformation();
   
       oos.defaultWriteObject();
  -    oos.writeInt(priority.toInt());    
  +    
  +    // serialize this event's priority
  +    writePriority(oos);
  +    
  +
     }
   
  +  private 
  +  void writePriority(ObjectOutputStream oos) throws java.io.IOException {
  +
  +    oos.writeInt(priority.toInt());
  +
  +    Class clazz = priority.getClass();
  +    if(clazz == Priority.class) {
  +      oos.writeObject(null);
  +    } else {
  +      oos.writeObject(clazz.getName());
  +    }
  +  }
  +
  +  private 
  +  void readPriority(ObjectInputStream ois) 
  +                      throws java.io.IOException, ClassNotFoundException {
  +
  +    int p = ois.readInt();
  +    try {
  +      String className = (String) ois.readObject();      
  +      if(className == null) {
  +	priority = Priority.toPriority(p);
  +      } else {
  +	Method m = (Method) methodCache.get(className);	
  +	if(m == null) {
  +	  Class clazz = Class.forName(className);
  +	  m = clazz.getDeclaredMethod(TO_PRIORITY, TO_PRIORITY_PARAMS);
  +	  methodCache.put(className, m);
  +	}      
  +	PARAM_ARRAY[0] = new Integer(p);
  +	priority = (Priority) m.invoke(null,  PARAM_ARRAY);
  +      }
  +    } catch(Exception e) {
  +	LogLog.warn("Priority deserialization failed, reverting default.", e);
  +	priority = Priority.toPriority(p);
  +    }
  +  }
  +
  +
  +
     private void readObject(ObjectInputStream ois)
                           throws java.io.IOException, ClassNotFoundException {
       ois.defaultReadObject();    
  -    priority = Priority.toPriority(ois.readInt());
  +    readPriority(ois);
  +    
       // Make sure that no location info is available to Layouts
       if(locationInfo == null)
         locationInfo = new LocationInfo(null, null);
  
  
  
  1.5       +1 -0      jakarta-log4j/org/apache/log4j/test/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/test/Makefile,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile	2001/01/17 13:02:27	1.4
  +++ Makefile	2001/01/19 16:45:31	1.5
  @@ -24,6 +24,7 @@
    UnitTestCyclicBuffer.java\
    UnitTestBoundedFIFO.java\
    UnitTestVarSubst.java\
  + SocketAppenderTest.java\
   
   SUBDIRS :=
   
  
  
  
  1.6       +1 -2      jakarta-log4j/org/apache/log4j/test/ShortSocketServer.java
  
  Index: ShortSocketServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/test/ShortSocketServer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ShortSocketServer.java	2001/01/18 17:25:34	1.5
  +++ ShortSocketServer.java	2001/01/19 16:45:31	1.6
  @@ -51,8 +51,7 @@
     void  usage(String msg) {
       System.err.println(msg);
       System.err.println(
  -      "Usage: java " +ShortSocketServer.class.getName() + 
  -                    " port configFile delay");
  +      "Usage: java " +ShortSocketServer.class.getName() + " port configFile");
       System.exit(1);
     }
       
  
  
  
  1.2       +3 -3      jakarta-log4j/org/apache/log4j/test/xml/asyncTest.xml
  
  Index: asyncTest.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/test/xml/asyncTest.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- asyncTest.xml	2001/01/18 17:25:35	1.1
  +++ asyncTest.xml	2001/01/19 16:45:33	1.2
  @@ -1,7 +1,7 @@
   <?xml version="1.0" encoding="UTF-8" ?>
  -<!DOCTYPE configuration SYSTEM "log4j.dtd">
  +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
   
  -<configuration>
  +<log4j:configuration>
           <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
              <appender-ref ref="TEMP" />
           </appender>
  @@ -21,4 +21,4 @@
              <appender-ref ref="ASYNC" />
           </root>
   
  -</configuration>
  \ No newline at end of file
  +</log4j:configuration>
  \ No newline at end of file
  
  
  
  1.2       +3 -3      jakarta-log4j/org/apache/log4j/test/xml/stressAsyncAppender.xml
  
  Index: stressAsyncAppender.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/test/xml/stressAsyncAppender.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- stressAsyncAppender.xml	2001/01/18 17:25:35	1.1
  +++ stressAsyncAppender.xml	2001/01/19 16:45:33	1.2
  @@ -1,7 +1,7 @@
   <?xml version="1.0" encoding="UTF-8" ?>
  -<!DOCTYPE configuration SYSTEM "log4j.dtd">
  +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
   
  -<configuration>
  +<log4j:configuration>
           <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
      	   <appender-ref ref="STDOUT" />
   	</appender>
  @@ -40,4 +40,4 @@
      	   <appender-ref ref="ASYNC" />
   	</root>
   	
  -</configuration>
  +</log4j:configuration>
  
  
  
  1.5       +61 -11    jakarta-log4j/org/apache/log4j/xml/examples/XCategory.java
  
  Index: XCategory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/examples/XCategory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XCategory.java	2001/01/10 01:04:06	1.4
  +++ XCategory.java	2001/01/19 16:45:36	1.5
  @@ -23,12 +23,13 @@
      Note that sub-classes follow the hiearchy even if its categories
      belong to different classes.
   
  -   See <b><a href="doc-files/XCategory.java">source code</a></b> for
  -   more details. See also <a
  +   <p>See <b><a href="doc-files/XCategory.java">source code</a></b>
  +   for more details. See also <a
      href="doc-files/extension1.xml">extension1.xml</a> and <a
  -   href="doc-files/extension2.xml">extension2.xml</a> XML configuration
  -   files.
  +   href="doc-files/extension2.xml">extension2.xml</a> XML
  +   configuration files.
   
  +   <p>
      
    */
   public class XCategory extends Category implements OptionHandler {
  @@ -50,16 +51,20 @@
       super(name);
     }
   
  +  /** 
  +     Nothing to activate.
  +   */
     public
     void activateOptions() {
     }
   
     /**
        Overrides the standard debug method by appending the value of
  -     suffix variable to each message.  */
  +     suffix variable to each message.  
  +  */
     public 
     void debug(String message) {
  -    log(instanceFQCN, Priority.DEBUG, message + suffix, null);
  +    log(instanceFQCN, Priority.DEBUG, message + " " + suffix, null);
     }
   
     /**
  @@ -74,6 +79,16 @@
     }
   
   
  +  /**
  +     This method overrides {@link Category#getInstance(Class)} by supplying
  +     its own factory type as a parameter.
  +   */
  +  public 
  +  static
  +  Category getInstance(Class clazz) {
  +    return getInstance(clazz.getName(), factory); 
  +  }
  +
    /**
       Retuns the option names for this component, namely the string
       {@link #SUFFIX_OPTION}.
  @@ -83,6 +98,32 @@
       return (new String[] {SUFFIX_OPTION});
     }
   
  +
  +  /**
  +     We introduce a new printing method in order to support {@link
  +     XPriority#LETHAL}.  */
  +  public
  +  void lethal(String message, Throwable t) { 
  +    // disable is a static variable defined in Category class
  +    if(disable >=  XPriority.LETHAL_INT) 
  +      return;
  +    if(XPriority.LETHAL.isGreaterOrEqual(this.getChainedPriority()))
  +      forcedLog(instanceFQN, XPriority.LETHAL, message, t);
  +  }
  +
  +  /**
  +     We introduce a new printing method in order to support {@link
  +     XPriority#LETHAL}.  */
  +  public
  +  void lethal(String message) { 
  +    // disable is a static variable defined in Category class
  +    if(disable >=  XPriority.LETHAL_INT) 
  +      return;
  +    if(XPriority.LETHAL.isGreaterOrEqual(this.getChainedPriority()))
  +      forcedLog(instanceFQN, XPriority.LETHAL, message, null);
  +  }
  +
  +
    /**
        Set XCategory specific options.
   
  @@ -104,6 +145,17 @@
        We introduce a new printing method that takes the TRACE priority.
     */
     public
  +  void trace(String message, Throwable t) { 
  +    // disable is defined in Category
  +    if(disable <=  XPriority.TRACE_INT) return;   
  +    if(XPriority.TRACE.isGreaterOrEqual(this.getChainedPriority()))
  +      forcedLog(instanceFQN, XPriority.TRACE, message, t);
  +  }
  +
  +  /**
  +     We introduce a new printing method that takes the TRACE priority.
  +  */
  +  public
     void trace(String message) { 
       // disable is defined in Category
       if(disable <=  XPriority.TRACE_INT) return;   
  @@ -113,11 +165,11 @@
     }
   
   
  +
     // Any sub-class of Category must also have its own implementation of 
     // CategoryFactory.
  -
  -  private static class XFactory implements CategoryFactory {
  -    XFactory() {
  +  public static class XFactory implements CategoryFactory {
  +    public XFactory() {
       }
   
       public
  @@ -125,8 +177,6 @@
         return new XCategory(name);
       }
     }
  -
  -
   }
   
   
  
  
  
  1.3       +21 -18    jakarta-log4j/org/apache/log4j/xml/examples/XPriority.java
  
  Index: XPriority.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/examples/XPriority.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XPriority.java	2000/12/14 21:08:41	1.2
  +++ XPriority.java	2001/01/19 16:45:36	1.3
  @@ -11,19 +11,19 @@
    */
   public class XPriority extends Priority {
   
  -  static final int  TRACE_INT  = 800;
  -  static final int  FATAL_INT  = 1;
  +  static final int  TRACE_INT   = 10000 - 1;
  +  static final int  LETHAL_INT  = 50000 + 1;
   
   
  -  // We assimilate FATAL to EMERG on Syslog  
  -  static final int SYSLOG_FATAL_INT  = 0;  
  -  // We assimilate TRACE to DEBUG on Syslog
  -  static final int SYSLOG_TRACE_INT  = 7;
  -
  -  public static final XPriority TRACE = new XPriority(TRACE_INT, "TRACE", 7);
  -  public static final XPriority FATAL = new XPriority(FATAL_INT, "FATAL", 
  -						      FATAL_INT);
  +  private static String TRACE_STR  = "TRACE";
  +  private static String LETHAL_STR  = "LETHAL";
   
  +
  +  public static final XPriority TRACE = new XPriority(TRACE_INT, TRACE_STR, 7);
  +  public static final XPriority LETHAL = new XPriority(LETHAL_INT, LETHAL_STR, 
  +						       0);
  +
  +
     protected
     XPriority(int level, String strLevel, int syslogEquiv) {
       super(level, strLevel, syslogEquiv);
  @@ -32,15 +32,18 @@
     public
     static
     Priority toPriority(String sArg) {
  -    if(sArg == null)
  -       return XPriority.TRACE;
  -    
  +    if(sArg == null) {
  +      return XPriority.TRACE;
  +    }
       String stringVal = sArg.toUpperCase();
  -    
  -    if(stringVal.equals("TRACE")) return XPriority.TRACE; 
  -    if(stringVal.equals("FATAL")) return XPriority.FATAL;
  -    return Priority.toPriority(sArg);
       
  +    if(stringVal.equals(TRACE_STR)) {
  +      return XPriority.TRACE;
  +    } else if(stringVal.equals(LETHAL_STR)) {
  +      return XPriority.LETHAL;
  +    }
  +      
  +    return Priority.toPriority(sArg);    
     }
   
     public
  @@ -48,7 +51,7 @@
     Priority toPriority(int i) throws  IllegalArgumentException {
       switch(i) {
       case TRACE_INT: return XPriority.TRACE;
  -    case FATAL_INT: return XPriority.FATAL;
  +    case LETHAL_INT: return XPriority.LETHAL;
       }
       return Priority.toPriority(i);
     }
  
  
  
  1.2       +3 -3      jakarta-log4j/org/apache/log4j/xml/examples/extension1.xml
  
  Index: extension1.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/examples/extension1.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- extension1.xml	2001/01/10 00:20:40	1.1
  +++ extension1.xml	2001/01/19 16:45:36	1.2
  @@ -1,11 +1,11 @@
   <?xml version="1.0" encoding="UTF-8" ?>
   
  -<!-- A sample file demonstrating the configuration of Category
  +<!-- A sample file demonstrating the log4j:configuration of Category
        and Priority sub-classes.  -->
   
   
   
  -<configuration>
  +<log4j:configuration>
   	<appender name="STDOUT" class="org.apache.log4j.FileAppender">
              <param name="File" value="System.out" />	
              <layout class="org.apache.log4j.PatternLayout">
  @@ -26,4 +26,4 @@
      	   <appender-ref ref="STDOUT" />
   	</root>
   	
  -</configuration>
  +</log4j:configuration>
  
  
  
  1.2       +4 -4      jakarta-log4j/org/apache/log4j/xml/examples/extension2.xml
  
  Index: extension2.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/examples/extension2.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- extension2.xml	2001/01/10 00:20:40	1.1
  +++ extension2.xml	2001/01/19 16:45:37	1.2
  @@ -1,17 +1,17 @@
   <?xml version="1.0" encoding="UTF-8" ?>
   
  -<!DOCTYPE configuration SYSTEM "log4j.dtd" [
  +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" [
     <!ENTITY XCategory "org.log4j.xml.examples.XCategory">
   ]>
   
   
  -<!-- A sample file demonstrating the configuration of Category and
  +<!-- A sample file demonstrating the log4j:configuration of Category and
        Priority sub-classes.
   -->
   
   
   
  -<configuration>
  +<log4j:configuration>
   	<appender name="STDOUT" class="org.apache.log4j.FileAppender">
              <param name="File" value="System.out" />	
              <layout class="org.apache.log4j.PatternLayout">
  @@ -34,4 +34,4 @@
      	   <appender-ref ref="STDOUT" />
   	</root>
   	
  -</configuration>
  \ No newline at end of file
  +</log4j:configuration>
  \ No newline at end of file
  
  
  
  1.3       +3 -3      jakarta-log4j/org/apache/log4j/xml/examples/sample1.xml
  
  Index: sample1.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/examples/sample1.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sample1.xml	2000/12/26 23:39:15	1.2
  +++ sample1.xml	2001/01/19 16:45:37	1.3
  @@ -1,7 +1,7 @@
   <?xml version="1.0" encoding="UTF-8" ?>
  -<!DOCTYPE configuration SYSTEM "log4j.dtd">
  +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
   
  -<configuration>
  +<log4j:configuration>
   
   	<appender name="STDOUT" class="org.apache.log4j.FileAppender">
              <param name="File" value="System.out" />	
  @@ -20,4 +20,4 @@
      	   <appender-ref ref="STDOUT" />
   	</root>
   	
  -</configuration>
  +</log4j:configuration>
  
  
  
  1.3       +3 -3      jakarta-log4j/org/apache/log4j/xml/examples/sample2.xml
  
  Index: sample2.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/examples/sample2.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sample2.xml	2000/12/26 23:39:15	1.2
  +++ sample2.xml	2001/01/19 16:45:37	1.3
  @@ -1,7 +1,7 @@
   <?xml version="1.0" encoding="UTF-8" ?>
  -<!DOCTYPE configuration SYSTEM "log4j.dtd">
  +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
   
  -<configuration>
  +<log4j:configuration>
   
   	<appender name="A1" class="org.apache.log4j.FileAppender">
               <param name="File"   value="A1.log" />
  @@ -30,4 +30,4 @@
      	   <appender-ref ref="STDOUT" />
   	</root>
   	
  -</configuration>
  +</log4j:configuration>
  
  
  
  1.3       +3 -3      jakarta-log4j/org/apache/log4j/xml/examples/sample3.xml
  
  Index: sample3.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/examples/sample3.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sample3.xml	2000/12/26 23:39:15	1.2
  +++ sample3.xml	2001/01/19 16:45:37	1.3
  @@ -1,7 +1,7 @@
   <?xml version="1.0" encoding="UTF-8"?> 
  -<!DOCTYPE configuration SYSTEM "log4j.dtd">
  +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
   
  -<configuration>
  +<log4j:configuration>
   	<appender name="A1" class="org.apache.log4j.net.SocketAppender">
   		<param name="RemoteHost" value="localhost"/>
   		<param name="Port" value="5000"/>
  @@ -26,4 +26,4 @@
   		<priority value="debug"/>
   		<appender-ref ref="STDOUT"/>
   	</root>
  -</configuration>
  +</log4j:configuration>
  
  
  
  1.3       +3 -3      jakarta-log4j/org/apache/log4j/xml/examples/sample4.xml
  
  Index: sample4.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/examples/sample4.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sample4.xml	2000/12/26 23:39:15	1.2
  +++ sample4.xml	2001/01/19 16:45:38	1.3
  @@ -1,7 +1,7 @@
   <?xml version="1.0" encoding="UTF-8"?> 
  -<!DOCTYPE configuration SYSTEM "log4j.dtd">
  +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
   
  -<configuration configDebug="true">
  +<log4j:configuration configDebug="true">
   
   	<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
   	        <appender-ref ref="TEMP"/>
  @@ -19,4 +19,4 @@
   		<priority value="debug"/>
   		<appender-ref ref="ASYNC"/>
   	</root>
  -</configuration>
  +</log4j:configuration>
  
  
  
  1.3       +0 -2      jakarta-log4j/org/apache/log4j/xml/test/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/test/Makefile,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile	2000/12/14 21:08:42	1.2
  +++ Makefile	2001/01/19 16:45:42	1.3
  @@ -2,8 +2,6 @@
   PKG_DIR :=org/apache/log4j/xml/test
   DEPTH   :=../../../../..
   JSOURCES:=DOMTest.java DisableOverrideTest.java \
  -	TPriority.java\
  -	TCategory.java\
   	SubClassTest.java\
   
   SUBDIRS :=
  
  
  
  1.4       +3 -2      jakarta-log4j/org/apache/log4j/xml/test/SubClassTest.java
  
  Index: SubClassTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/xml/test/SubClassTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SubClassTest.java	2000/12/20 15:57:32	1.3
  +++ SubClassTest.java	2001/01/19 16:45:42	1.4
  @@ -5,6 +5,7 @@
   import org.apache.log4j.Category;
   import org.apache.log4j.Priority;
   import org.apache.log4j.xml.examples.ReportParserError;
  +import org.apache.log4j.xml.examples.XCategory;
   //import org.apache.xerces.parsers.DOMParser;
   //import java.io.FileInputStream;
   //import org.xml.sax.InputSource;
  @@ -14,8 +15,8 @@
   */
   public class SubClassTest {
   
  -  static TCategory cat = (TCategory) 
  -                        TCategory.getInstance(SubClassTest.class.getName());
  +  static XCategory cat = (XCategory) 
  +                        XCategory.getInstance(SubClassTest.class.getName());
   
   
     public