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 2002/01/22 00:07:12 UTC

cvs commit: jakarta-log4j/src/xdocs documentation.xml

ceki        02/01/21 15:07:12

  Modified:    .        build.xml
               docs     HISTORY documentation.html
               examples NumberCruncher.java NumberCruncherClient.java
                        NumberCruncherServer.java
               src/java/org/apache/log4j HTMLLayout.java Priority.java
                        TTCCLayout.java
               src/java/org/apache/log4j/helpers PatternParser.java
               src/java/org/apache/log4j/net JMSSink.java SocketNode.java
               src/java/org/apache/log4j/spi LoggingEvent.java
               src/java/org/apache/log4j/test UnitTestBoundedFIFO.java
                        UnitTestLogger.java UnitTestOR.java
               src/java/org/apache/log4j/varia PriorityMatchFilter.java
               src/java/org/apache/log4j/xml XMLLayout.java
               src/xdocs documentation.xml
  Added:       src/java/org/apache/log4j/test/serialization
                        SerializationUT.java
               src/java/org/apache/log4j/test/serialization/T T113.java
                        T12.java
  Removed:     examples Makefile
  Log:
  - Added serialization tests to confirm backward compatibility.
  
  - Modified java files under examples/ to reflect new package name.
  
  Revision  Changes    Path
  1.13      +20 -5     jakarta-log4j/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/build.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build.xml	17 Jan 2002 14:48:58 -0000	1.12
  +++ build.xml	21 Jan 2002 23:07:11 -0000	1.13
  @@ -14,8 +14,8 @@
     <!-- prefixed with "env". -->
     <property environment="env"/>
   
  -  <property name="version" value="1.2alpha6"/>
  -
  +  <property name="version" value="1.2alpha7"/>
  +  
     <!-- The base directory relative to which most targets are built -->
     <property name="base" value="."/>
    
  @@ -130,7 +130,7 @@
       <tstamp />
     </target>
   
  -  <target name="build" depends="init, build.core, build.xml, build.unitTests, 
  +  <target name="build" depends="init, build.core, build.examples, build.xml, build.unitTests, 
                                   build.javamail, build.jms, build.jmx"/>
   
     <target name="build.core" depends="init">
  @@ -144,17 +144,31 @@
   	            **/doc-files/*,
                       ${stem}/xml/**,
                       ${stem}/gui/**,
  +                    ${stem}/test/serialization/**,
   		    ${stem}/net/SMTPAppender.java,
                  	    ${stem}/net/JMS*.java,
                  	    ${stem}/jmx/*.java,
                  	    ${stem}/or/jms/MessageRenderer.java,
   		    **/pending/**" 
   	    debug="on"/>			
  +  </target>
  +
  +  <target name="build.examples" depends="build.core">
  +    <mkdir dir="${javac.dest}" />
  +    <javac srcdir="${java.source.dir}"
  +	   destdir="${javac.dest}"
  +	   includes="examples/**/*.java"
  +	   classpath="${classpath}"
  +	   excludes="misc/*" 
  +	    debug="on"/>			
       <rmic base="${javac.dest}" 
  -	  classname="org.apache.log4j.examples.NumberCruncherServer"
  -	/>
  +      classname="examples.NumberCruncherServer"
  +      />    
     </target>
   
  +
  +
  +
     <target name="build.unitTests" depends="init, junit" if="junit-present">   
       <javac srcdir="${java.source.dir}"
   	   destdir="${javac.dest}"
  @@ -332,6 +346,7 @@
   			  docs/**, 
   			  build/*,
   	                  build.bat, build.sh,
  +	                  build.xml,
   	                  build/lib/ant-1.4.jar,
   			  build/lib/jaxp-1.1.jar,
   			  build/lib/crimson-1.1.jar,
  
  
  
  1.78      +3 -0      jakarta-log4j/docs/HISTORY
  
  Index: HISTORY
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/HISTORY,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- HISTORY	14 Jan 2002 19:17:41 -0000	1.77
  +++ HISTORY	21 Jan 2002 23:07:11 -0000	1.78
  @@ -9,6 +9,9 @@
    
    - Release of version 1.2 (ALPHA)
   
  + - The src/java/org/apache/log4j/examples/ directory moved under the
  +   top-level directory as examples/. [*]
  +
    - Improved error reporting in DOMConfigurator. Thanks to Thomas Tuft
      Muller for contributing the enhancement. [*]
   	
  
  
  
  1.21      +1 -1      jakarta-log4j/docs/documentation.html
  
  Index: documentation.html
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/documentation.html,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- documentation.html	17 Jan 2002 17:35:14 -0000	1.20
  +++ documentation.html	21 Jan 2002 23:07:11 -0000	1.21
  @@ -12,7 +12,7 @@
               <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
   
                                                       <meta name="author" value="Ceki Gulcu">
  -            <meta name="email" value="cgu@apache.org">
  +            <meta name="email" value="ceki@apache.org">
               
               <title>Log4j project - Documentation</title>
           </head>
  
  
  
  1.3       +1 -1      jakarta-log4j/examples/NumberCruncher.java
  
  Index: NumberCruncher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/examples/NumberCruncher.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NumberCruncher.java	14 Dec 2000 21:07:34 -0000	1.2
  +++ NumberCruncher.java	21 Jan 2002 23:07:11 -0000	1.3
  @@ -1,5 +1,5 @@
   
  -package org.apache.log4j.examples;
  +package examples;
   
   import java.rmi.Remote;
   import java.rmi.RemoteException;
  
  
  
  1.3       +1 -1      jakarta-log4j/examples/NumberCruncherClient.java
  
  Index: NumberCruncherClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/examples/NumberCruncherClient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NumberCruncherClient.java	14 Dec 2000 21:07:35 -0000	1.2
  +++ NumberCruncherClient.java	21 Jan 2002 23:07:11 -0000	1.3
  @@ -5,7 +5,7 @@
    * License version 1.1, a copy of which has been included with this
    * distribution in the LICENSE.APL file.  */
   
  -package org.apache.log4j.examples;
  +package examples;
   
   import java.rmi.Remote;
   import java.rmi.server.UnicastRemoteObject;
  
  
  
  1.3       +1 -1      jakarta-log4j/examples/NumberCruncherServer.java
  
  Index: NumberCruncherServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/examples/NumberCruncherServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NumberCruncherServer.java	14 Dec 2000 21:07:35 -0000	1.2
  +++ NumberCruncherServer.java	21 Jan 2002 23:07:11 -0000	1.3
  @@ -5,7 +5,7 @@
    * License version 1.1, a copy of which has been included with this
    * distribution in the LICENSE.APL file.  */
   
  -package org.apache.log4j.examples;
  +package examples;
   
   import java.rmi.Remote;
   import java.rmi.server.UnicastRemoteObject;
  
  
  
  1.25      +2 -2      jakarta-log4j/src/java/org/apache/log4j/HTMLLayout.java
  
  Index: HTMLLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/HTMLLayout.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- HTMLLayout.java	2 Sep 2001 21:58:27 -0000	1.24
  +++ HTMLLayout.java	21 Jan 2002 23:07:11 -0000	1.25
  @@ -147,8 +147,8 @@
       }
       sbuf.append("</td>" + Layout.LINE_SEP);
   
  -    sbuf.append("<td title=\"" + event.loggerName + " category\">");
  -    sbuf.append(escapeHTMLTags(event.loggerName));
  +    sbuf.append("<td title=\"" + event.categoryName + " category\">");
  +    sbuf.append(escapeHTMLTags(event.categoryName));
       sbuf.append("</td>" + Layout.LINE_SEP);
   
       if(locationInfo) {
  
  
  
  1.19      +1 -1      jakarta-log4j/src/java/org/apache/log4j/Priority.java
  
  Index: Priority.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Priority.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Priority.java	22 Nov 2001 21:03:41 -0000	1.18
  +++ Priority.java	21 Jan 2002 23:07:11 -0000	1.19
  @@ -155,7 +155,7 @@
     public
     static
     Level toPriority(String sArg) {
  -    return Level.toPriority(sArg);
  +    return Level.toLevel(sArg);
     }
   
     /**
  
  
  
  1.12      +1 -1      jakarta-log4j/src/java/org/apache/log4j/TTCCLayout.java
  
  Index: TTCCLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/TTCCLayout.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TTCCLayout.java	2 Sep 2001 21:40:35 -0000	1.11
  +++ TTCCLayout.java	21 Jan 2002 23:07:11 -0000	1.12
  @@ -185,7 +185,7 @@
       buf.append(' ');
   
       if(this.categoryPrefixing) {
  -      buf.append(event.loggerName);
  +      buf.append(event.categoryName);
         buf.append(' ');
       }
   
  
  
  
  1.16      +1 -1      jakarta-log4j/src/java/org/apache/log4j/helpers/PatternParser.java
  
  Index: PatternParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/helpers/PatternParser.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- PatternParser.java	2 Sep 2001 21:40:36 -0000	1.15
  +++ PatternParser.java	21 Jan 2002 23:07:11 -0000	1.16
  @@ -541,7 +541,7 @@
       }
       
       String getFullyQualifiedName(LoggingEvent event) {
  -      return event.loggerName;
  +      return event.categoryName;
       }
     }  
   }
  
  
  
  1.10      +1 -1      jakarta-log4j/src/java/org/apache/log4j/net/JMSSink.java
  
  Index: JMSSink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/JMSSink.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JMSSink.java	28 Nov 2001 22:20:44 -0000	1.9
  +++ JMSSink.java	21 Jan 2002 23:07:12 -0000	1.10
  @@ -73,7 +73,7 @@
         while(true) {
   	ObjectMessage msg = (ObjectMessage)topicSubscriber.receive();      
   	event = (LoggingEvent) msg.getObject();
  -	remoteCategory = Category.getInstance(event.loggerName);
  +	remoteCategory = Category.getInstance(event.categoryName);
   	remoteCategory.callAppenders(event);	
   	
   	// dump the JMSMessage
  
  
  
  1.14      +1 -1      jakarta-log4j/src/java/org/apache/log4j/net/SocketNode.java
  
  Index: SocketNode.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/SocketNode.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SocketNode.java	5 Sep 2001 06:45:28 -0000	1.13
  +++ SocketNode.java	21 Jan 2002 23:07:12 -0000	1.14
  @@ -66,7 +66,7 @@
       try {
         while(true) {	
   	event = (LoggingEvent) ois.readObject();	
  -	remoteLogger = hierarchy.getLogger(event.loggerName);
  +	remoteLogger = hierarchy.getLogger(event.categoryName);
   	event.logger = remoteLogger;
   	if(event.level.isGreaterOrEqual(remoteLogger.getChainedLevel())) {
   	  remoteLogger.callAppenders(event);	
  
  
  
  1.24      +4 -4      jakarta-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java
  
  Index: LoggingEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- LoggingEvent.java	5 Sep 2001 06:45:29 -0000	1.23
  +++ LoggingEvent.java	21 Jan 2002 23:07:12 -0000	1.24
  @@ -49,8 +49,8 @@
     entity after deserialization. */
     transient public Category logger;
   
  -  /** The level name. */
  -  public final String loggerName;
  +  /** The category (logger) name. */
  +  public final String categoryName;
     
     /** Level of logging event. Level cannot be serializable
         because it is a flyweight.  Due to its special seralization it
  @@ -122,8 +122,8 @@
   		      Priority priority, Object message, Throwable throwable) {
       this.fqnOfCategoryClass = fqnOfCategoryClass;
       this.logger = logger;
  -    this.loggerName = logger.getName();
  -    this.level = priority;
  +    this.categoryName = logger.getName();
  +    this.level = priority;   
       this.message = message;
       if(throwable != null) {
         this.throwableInfo = new ThrowableInformation(throwable);
  
  
  
  1.4       +1 -1      jakarta-log4j/src/java/org/apache/log4j/test/UnitTestBoundedFIFO.java
  
  Index: UnitTestBoundedFIFO.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/UnitTestBoundedFIFO.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UnitTestBoundedFIFO.java	23 Jan 2001 22:07:42 -0000	1.3
  +++ UnitTestBoundedFIFO.java	21 Jan 2002 23:07:12 -0000	1.4
  @@ -3,7 +3,7 @@
    *
    * This software is published under the terms of the Apache Software
    * License version 1.1, a copy of which has been included with this
  - * distribution in the LICENSE.APL file.  */
  + * distribution in the LICENSE.txt file.  */
   
   //
   // Log4j uses the JUnit framework for internal unit testing. JUnit
  
  
  
  1.5       +1 -1      jakarta-log4j/src/java/org/apache/log4j/test/UnitTestLogger.java
  
  Index: UnitTestLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/UnitTestLogger.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- UnitTestLogger.java	28 Sep 2001 13:37:48 -0000	1.4
  +++ UnitTestLogger.java	21 Jan 2002 23:07:12 -0000	1.5
  @@ -3,7 +3,7 @@
    *
    * This software is published under the terms of the Apache Software
    * License version 1.1, a copy of which has been included with this
  - * distribution in the LICENSE.APL file.  */
  + * distribution in the LICENSE.txt file.  */
   
   package org.apache.log4j.test;
   
  
  
  
  1.5       +1 -1      jakarta-log4j/src/java/org/apache/log4j/test/UnitTestOR.java
  
  Index: UnitTestOR.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/UnitTestOR.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- UnitTestOR.java	27 Dec 2000 23:27:05 -0000	1.4
  +++ UnitTestOR.java	21 Jan 2002 23:07:12 -0000	1.5
  @@ -3,7 +3,7 @@
    *
    * This software is published under the terms of the Apache Software
    * License version 1.1, a copy of which has been included with this
  - * distribution in the LICENSE.APL file.  */
  + * distribution in the LICENSE.txt file.  */
   
   //
   // Log4j uses the JUnit framework for internal unit testing. JUnit
  
  
  
  1.1                  jakarta-log4j/src/java/org/apache/log4j/test/serialization/SerializationUT.java
  
  Index: SerializationUT.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software
   * License version 1.1, a copy of which has been included with this
   * distribution in the LICENSE.txt file.  */
  
  import org.apache.log4j.*;
  import org.apache.log4j.spi.*;
  
  import junit.framework.TestCase;
  import junit.framework.TestSuite;
  import junit.framework.Test;
  import java.util.Hashtable;
  
  import java.net.URL;
  import java.net.URLClassLoader;
  import java.net.MalformedURLException;
  import java.lang.reflect.Method;
  
  /**
     The SerializationUnitTest checks whether the {@link LoggingEvent}
     objects are compatible across different log4j versions.
  
     @author Ceki G&uuml;lc&uuml;
  
  */
  public class SerializationUT extends TestCase {
  
    // String categoryName
    // String ndc
    // boolan ndcLookupRequired
    // String renderedMessage
    // String threadName
    // long timeStamp
  
  
    static URLClassLoader classLoader113;
    static Class class113; 
    static Object o113;
    static Method serMethod113;
    static Method deserMethod113;
  
    static URLClassLoader classLoader12a7;
    static Class class12a7;
    static Object o12a7;
    static Method serMethod12a7;
    static Method deserMethod12a7;
    
    public SerializationUT(String name) {
      super(name);
    }
  
    public
    void setUp() throws Exception {
      
      try {
        URL urlLocal = new URL("file:T/");
  
        URL url113 = new URL("file:T/log4j-1.1.3.jar");
     
        classLoader113 = new URLClassLoader(new URL[] {urlLocal, url113}); 
        class113  = classLoader113.loadClass("T113");
        o113 = class113.newInstance();
        serMethod113 = class113.getMethod("serialize", 
  					new Class[] {java.util.Hashtable.class});
        
        deserMethod113 = class113.getMethod("deserialize", 
  					  new Class[] {byte[].class}); 
        
  
        URL url2a7 = new URL("file:T/log4j-1.2alpha7.jar");
     
        classLoader12a7 = new URLClassLoader(new URL[] {urlLocal, url2a7});
        class12a7 = classLoader12a7.loadClass("T12");
        o12a7 = class12a7.newInstance();
        serMethod12a7 = class12a7.getMethod("serialize", 
  					 new Class[] {java.util.Hashtable.class});
        deserMethod12a7 = class12a7.getMethod("deserialize", 
  					   new Class[] {byte[].class});     
      } catch(Exception e) {
        e.printStackTrace();
        throw e;
      }
      
      System.out.println("---Exiting setup");
    }
  
    public
    void tearDown() {
    }
  
    public 
    void test1() throws Exception {
      
      Hashtable inHt = new Hashtable();
      Hashtable witness = new Hashtable();
  
      inHt.put("categoryName", "a.b.c");
      inHt.put("priorityStr", "DEBUG");
      inHt.put("message", "hello");
     
      witness.put("categoryName", "a.b.c");
      witness.put("priorityStr", "DEBUG");
      witness.put("renderedMessage", "hello");
  
      byte[] buf = (byte[]) serMethod113.invoke(o113, new Object[] {inHt});
  
      Hashtable outHt = (Hashtable) deserMethod113.invoke(o113, new Object[] {buf});
  
      System.out.println("witness"+witness);
      System.out.println("outHt  "+outHt);
  
      assertEquals(witness, outHt);
    }
  
    public 
    void test2() throws Exception {
      
      Hashtable inHt = new Hashtable();
      Hashtable witness = new Hashtable();
  
      inHt.put("categoryName", "a.b.c");
      inHt.put("priorityStr", "DEBUG");
      inHt.put("message", "hello");
     
      witness.put("categoryName", "a.b.c");
      witness.put("priorityStr", "DEBUG");
      witness.put("renderedMessage", "hello");
  
      byte[] buf = (byte[]) serMethod12a7.invoke(o12a7, new Object[] {inHt});
  
      Hashtable outHt = (Hashtable) deserMethod12a7.invoke(o12a7, new Object[] {buf});
  
      System.out.println("witness"+witness);
      System.out.println("outHt  "+outHt);
  
      assertEquals(witness, outHt);
    }
  
   
    public
    static
    Test suite() {
      TestSuite suite = new TestSuite();
      suite.addTest(new SerializationUT("test1"));
      suite.addTest(new SerializationUT("test2"));
      return suite;
    }   
  }
  
  
  
  
  1.1                  jakarta-log4j/src/java/org/apache/log4j/test/serialization/T/T113.java
  
  Index: T113.java
  ===================================================================
  
  import java.io.*;
  
  import org.apache.log4j.Category;
  import org.apache.log4j.Priority;
  import org.apache.log4j.spi.LoggingEvent;
  
  import java.util.Hashtable;
  
  
  // String categoryName
  // String ndc
  // boolan ndcLookupRequired
  // String renderedMessage
  // String threadName
  // long timeStamp
  
  // LocationInfo
  // ThrowableInformation ti.
  public class T113 {
  
    public
    byte[] serialize(Hashtable ht) {
      try {
        Category category = Category.getInstance((String) ht.get("categoryName"));
        
  
        LoggingEvent event = new LoggingEvent("org.apache.log4j.Category", 
  					    category, 
  					    Priority.toPriority((String)ht.get("priorityStr")),
  					    ht.get("message"), 
  					    (Throwable) ht.get("throwable"));
        event.getThreadName();
  
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(event);
        oos.flush();
        return baos.toByteArray();
      } catch (Exception e) {
        e.printStackTrace();
        return null;
      }
    }
  
    public
    Hashtable deserialize(byte[] buf) {
      try {
        System.out.println("deserialize called.");
        ByteArrayInputStream bais = new ByteArrayInputStream(buf);
        ObjectInputStream si = new ObjectInputStream(bais);  
        LoggingEvent event = (LoggingEvent)  si.readObject();	    
        System.out.println("Desrialization looks successful.");
  
        return eventToHashtable(event);
      } catch (Exception e) {
        e.printStackTrace();
        return null;
      }
    }
  
    Hashtable eventToHashtable(LoggingEvent event) {
      Hashtable ht = new Hashtable();
      ht.put("categoryName", event.categoryName);
      ht.put("renderedMessage", event.getRenderedMessage());
      ht.put("priorityStr", event.priority.toString());
      return ht;
    }
     
  }
  
  
  
  
  1.1                  jakarta-log4j/src/java/org/apache/log4j/test/serialization/T/T12.java
  
  Index: T12.java
  ===================================================================
  
  import java.io.*;
  
  import org.apache.log4j.Category;
  import org.apache.log4j.Priority;
  import org.apache.log4j.spi.LoggingEvent;
  
  import java.util.Hashtable;
  
  
  // String categoryName
  // String ndc
  // boolan ndcLookupRequired
  // String renderedMessage
  // String threadName
  // long timeStamp
  
  // LocationInfo
  // ThrowableInformation ti.
  public class T12 {
  
    public
    byte[] serialize(Hashtable ht) {
      try {
        Category category = Category.getInstance((String) ht.get("categoryName"));
        
  
        LoggingEvent event = new LoggingEvent("org.apache.log4j.Category", 
  					    category, 
  					    Priority.toPriority((String)ht.get("priorityStr")),
  					    ht.get("message"), 
  					    (Throwable) ht.get("throwable"));
        event.getThreadName();
  
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(event);
        oos.flush();
        return baos.toByteArray();
      } catch (Exception e) {
        e.printStackTrace();
        return null;
      }
    }
  
    public
    Hashtable deserialize(byte[] buf) {
      try {
        System.out.println("deserialize called.");
        ByteArrayInputStream bais = new ByteArrayInputStream(buf);
        ObjectInputStream si = new ObjectInputStream(bais);  
        LoggingEvent event = (LoggingEvent)  si.readObject();	    
        System.out.println("Desrialization looks successful.");
  
        return eventToHashtable(event);
      } catch (Exception e) {
        e.printStackTrace();
        return null;
      }
    }
  
    Hashtable eventToHashtable(LoggingEvent event) {
      Hashtable ht = new Hashtable();
      ht.put("categoryName", event.categoryName);
      ht.put("renderedMessage", event.getRenderedMessage());
      ht.put("priorityStr", event.level.toString());
      return ht;
    }
     
  }
  
  
  
  
  1.10      +1 -1      jakarta-log4j/src/java/org/apache/log4j/varia/PriorityMatchFilter.java
  
  Index: PriorityMatchFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/varia/PriorityMatchFilter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PriorityMatchFilter.java	14 Nov 2001 20:31:15 -0000	1.9
  +++ PriorityMatchFilter.java	21 Jan 2002 23:07:12 -0000	1.10
  @@ -33,7 +33,7 @@
   
      @author Ceki G&uuml;lc&uuml;
      
  -   @deprecated Use {@link PriorityMatchFilter} instead.
  +   @deprecated Use {@link LevelMatchFilter} instead.
      @since 0.9.1 */
   public class PriorityMatchFilter extends Filter {
     
  
  
  
  1.16      +1 -1      jakarta-log4j/src/java/org/apache/log4j/xml/XMLLayout.java
  
  Index: XMLLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/XMLLayout.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- XMLLayout.java	2 Sep 2001 21:40:36 -0000	1.15
  +++ XMLLayout.java	21 Jan 2002 23:07:12 -0000	1.16
  @@ -140,7 +140,7 @@
       // We yield to the \r\n heresy.
   
       buf.append("<log4j:event category=\"");
  -    buf.append(event.loggerName);
  +    buf.append(event.categoryName);
       buf.append("\" timestamp=\"");
       buf.append(event.timeStamp);
       buf.append("\" level=\"");
  
  
  
  1.14      +1 -1      jakarta-log4j/src/xdocs/documentation.xml
  
  Index: documentation.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/xdocs/documentation.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- documentation.xml	17 Jan 2002 17:35:15 -0000	1.13
  +++ documentation.xml	21 Jan 2002 23:07:12 -0000	1.14
  @@ -2,7 +2,7 @@
   <document>
   
     <properties>
  -    <author email="cgu@apache.org">Ceki Gulcu</author>
  +    <author email="ceki@apache.org">Ceki Gulcu</author>
       <title>Documentation</title>
     </properties>
   
  
  
  

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