logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/log4j Decoder.java
Date Thu, 27 May 2004 12:16:58 GMT
ceki        2004/05/27 05:16:58

  Modified:    src/java/org/apache/log4j/xml UtilLoggingXMLDecoder.java
                        XMLDecoder.java
               src/java/org/apache/log4j/chainsaw FileLoadAction.java
               src/java/org/apache/log4j/net UDPReceiver.java
                        MulticastReceiver.java UDPAppender.java
               tests/src/java/org/apache/log4j/net
                        SocketServerTestCase.java
  Added:       tests/witness/net socketServer.7 socketServer.8
                        socketServer.5 socketServer.2 socketServer.3
                        socketServer.4 socketServer.1 socketServer.6
               src/java/org/apache/log4j/spi Decoder.java
               tests/input/net socketServer6.properties
                        socketServer2.properties socketServer4.properties
                        socketServer3.properties socketServer1.properties
                        socketServer5.properties socketServer8.properties
                        socketServer7.properties
  Removed:     tests/input socketServer4.properties
                        socketServer5.properties socketServer7.properties
                        socketServer6.properties socketServer8.properties
                        socketServer1.properties socketServer3.properties
                        socketServer2.properties
               tests/witness socketServer.4 socketServer.1 socketServer.3
                        socketServer.6 socketServer.7 socketServer.8
                        socketServer.2 socketServer.5
               src/java/org/apache/log4j Decoder.java
  Log:
  - Moved socketServer witness and input files into a net/ subdiectory.
  - Moved o.a.l.Decoder to o.a.l.spi.Decoder
  
  Revision  Changes    Path
  1.1                  logging-log4j/tests/witness/net/socketServer.7
  
  Index: socketServer.7
  ===================================================================
  DEBUG some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 1
  DEBUG some7 T7 client-test7 MDC-TEST7 [main] root - Message 2
   INFO some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 3
   WARN some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 4
  LETHAL some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 5
  DEBUG some7 T7 client-test7 MDC-TEST7 [main] SocketServerTestCase - Message 6
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test7(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  ERROR some7 T7 client-test7 MDC-TEST7 [main] root - Message 7
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test7(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  
  
  
  1.1                  logging-log4j/tests/witness/net/socketServer.8
  
  Index: socketServer.8
  ===================================================================
  DEBUG some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 1
  DEBUG some8 T8 shortSocketServer MDC-TEST8 [main] root - Message 2
   INFO some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 3
   WARN some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 4
  LETHAL some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 5
  DEBUG some8 T8 shortSocketServer MDC-TEST8 [main] SocketServerTestCase - Message 6
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test8(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  ERROR some8 T8 shortSocketServer MDC-TEST8 [main] root - Message 7
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test8(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  
  
  
  1.1                  logging-log4j/tests/witness/net/socketServer.5
  
  Index: socketServer.5
  ===================================================================
  DEBUG some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 1
  DEBUG some5 T5 MDC-TEST5 [main] root - Message 2
   INFO some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 3
   WARN some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 4
  LETHAL some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 5
  DEBUG some5 T5 MDC-TEST5 [main] SocketServerTestCase - Message 6
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test5(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  ERROR some5 T5 MDC-TEST5 [main] root - Message 7
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test5(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  
  
  
  1.1                  logging-log4j/tests/witness/net/socketServer.2
  
  Index: socketServer.2
  ===================================================================
  DEBUG T2 [main] ? (?:?) Message 1
  DEBUG T2 [main] ? (?:?) Message 2
   INFO T2 [main] ? (?:?) Message 3
   WARN T2 [main] ? (?:?) Message 4
  LETHAL T2 [main] ? (?:?) Message 5
  DEBUG T2 [main] ? (?:?) Message 6
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test2(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  ERROR T2 [main] ? (?:?) Message 7
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test2(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  
  
  1.1                  logging-log4j/tests/witness/net/socketServer.3
  
  Index: socketServer.3
  ===================================================================
  DEBUG T3 [main] org.apache.log4j.net.SocketServerTestCase (X) Message 1
  DEBUG T3 [main] org.apache.log4j.net.SocketServerTestCase (X) Message 2
   INFO T3 [main] org.apache.log4j.net.SocketServerTestCase (X) Message 3
   WARN T3 [main] org.apache.log4j.net.SocketServerTestCase (X) Message 4
  LETHAL T3 [main] org.apache.log4j.net.SocketServerTestCase (X) Message 5
  DEBUG T3 [main] org.apache.log4j.net.SocketServerTestCase (X) Message 6
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test3(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  ERROR T3 [main] org.apache.log4j.net.SocketServerTestCase (X) Message 7
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test3(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  
  
  
  1.1                  logging-log4j/tests/witness/net/socketServer.4
  
  Index: socketServer.4
  ===================================================================
  DEBUG some T4 MDC-TEST4 [main] SocketServerTestCase - Message 1
  DEBUG some T4 MDC-TEST4 [main] root - Message 2
   INFO some T4 MDC-TEST4 [main] SocketServerTestCase - Message 3
   WARN some T4 MDC-TEST4 [main] SocketServerTestCase - Message 4
  LETHAL some T4 MDC-TEST4 [main] SocketServerTestCase - Message 5
  DEBUG some T4 MDC-TEST4 [main] SocketServerTestCase - Message 6
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test4(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  ERROR some T4 MDC-TEST4 [main] root - Message 7
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test4(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  
  
  
  1.1                  logging-log4j/tests/witness/net/socketServer.1
  
  Index: socketServer.1
  ===================================================================
  DEBUG T1 [main] org.apache.log4j.net.SocketServerTestCase Message 1
  DEBUG T1 [main] root Message 2
   INFO T1 [main] org.apache.log4j.net.SocketServerTestCase Message 3
   WARN T1 [main] org.apache.log4j.net.SocketServerTestCase Message 4
  LETHAL T1 [main] org.apache.log4j.net.SocketServerTestCase Message 5
  DEBUG T1 [main] org.apache.log4j.net.SocketServerTestCase Message 6
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test1(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  ERROR T1 [main] root Message 7
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test1(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  
  
  1.1                  logging-log4j/tests/witness/net/socketServer.6
  
  Index: socketServer.6
  ===================================================================
  DEBUG some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 1
  DEBUG some6 T6 client-test6 MDC-TEST6 [main] root - Message 2
   INFO some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 3
   WARN some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 4
  LETHAL some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 5
  DEBUG some6 T6 client-test6 MDC-TEST6 [main] SocketServerTestCase - Message 6
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test6(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  ERROR some6 T6 client-test6 MDC-TEST6 [main] root - Message 7
  java.lang.Exception: Just testing
  	at org.apache.log4j.net.SocketServerTestCase.common(X)
  	at org.apache.log4j.net.SocketServerTestCase.test6(X)
  	at java.lang.reflect.Method.invoke(X)
  	at junit.framework.TestCase.runTest(X)
  	at junit.framework.TestCase.runBare(X)
  	at junit.framework.TestResult$1.protect(X)
  	at junit.framework.TestResult.runProtected(X)
  	at junit.framework.TestResult.run(X)
  	at junit.framework.TestCase.run(X)
  	at junit.framework.TestSuite.runTest(X)
  	at junit.framework.TestSuite.run(X)
  
  
  
  1.16      +1 -1      logging-log4j/src/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java
  
  Index: UtilLoggingXMLDecoder.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/xml/UtilLoggingXMLDecoder.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- UtilLoggingXMLDecoder.java	23 May 2004 16:15:05 -0000	1.15
  +++ UtilLoggingXMLDecoder.java	27 May 2004 12:16:57 -0000	1.16
  @@ -33,10 +33,10 @@
   import javax.xml.parsers.DocumentBuilderFactory;
   import javax.xml.parsers.ParserConfigurationException;
   
  -import org.apache.log4j.Decoder;
   import org.apache.log4j.Level;
   import org.apache.log4j.Logger;
   import org.apache.log4j.UtilLoggingLevel;
  +import org.apache.log4j.spi.Decoder;
   import org.apache.log4j.spi.LocationInfo;
   import org.apache.log4j.spi.LoggingEvent;
   import org.apache.log4j.spi.ThrowableInformation;
  
  
  
  1.19      +1 -1      logging-log4j/src/java/org/apache/log4j/xml/XMLDecoder.java
  
  Index: XMLDecoder.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/xml/XMLDecoder.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- XMLDecoder.java	23 May 2004 16:15:05 -0000	1.18
  +++ XMLDecoder.java	27 May 2004 12:16:57 -0000	1.19
  @@ -32,10 +32,10 @@
   import javax.xml.parsers.DocumentBuilderFactory;
   import javax.xml.parsers.ParserConfigurationException;
   
  -import org.apache.log4j.Decoder;
   import org.apache.log4j.Level;
   import org.apache.log4j.Logger;
   import org.apache.log4j.UtilLoggingLevel;
  +import org.apache.log4j.spi.Decoder;
   import org.apache.log4j.spi.LocationInfo;
   import org.apache.log4j.spi.LoggingEvent;
   import org.apache.log4j.spi.ThrowableInformation;
  
  
  
  1.12      +1 -1      logging-log4j/src/java/org/apache/log4j/chainsaw/FileLoadAction.java
  
  Index: FileLoadAction.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/FileLoadAction.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FileLoadAction.java	23 May 2004 16:15:05 -0000	1.11
  +++ FileLoadAction.java	27 May 2004 12:16:57 -0000	1.12
  @@ -30,9 +30,9 @@
   import javax.swing.JOptionPane;
   import javax.swing.filechooser.FileFilter;
   
  -import org.apache.log4j.Decoder;
   import org.apache.log4j.Logger;
   import org.apache.log4j.helpers.Constants;
  +import org.apache.log4j.spi.Decoder;
   import org.apache.log4j.spi.LoggingEvent;
   
   
  
  
  
  1.1                  logging-log4j/src/java/org/apache/log4j/spi/Decoder.java
  
  Index: Decoder.java
  ===================================================================
  /*
   * Copyright 1999,2004 The Apache Software Foundation.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package org.apache.log4j.spi;
  
  
  import java.io.IOException;
  
  import java.net.URL;
  
  import java.util.Map;
  import java.util.Vector;
  
  
  /**
   *  Allow LoggingEvents to be reconstructed from a different format 
   * (usually XML).
   *
   *  @author Scott Deboy <sdeboy@apache.org>
   *
   */
  public interface Decoder {
    Vector decodeEvents(String document);
  
    LoggingEvent decode(String event);
  
    Vector decode(URL url) throws IOException;
  
    void setAdditionalProperties(Map additionalProperties);
  }
  
  
  
  1.8       +3 -2      logging-log4j/src/java/org/apache/log4j/net/UDPReceiver.java
  
  Index: UDPReceiver.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/net/UDPReceiver.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- UDPReceiver.java	27 May 2004 07:22:27 -0000	1.7
  +++ UDPReceiver.java	27 May 2004 12:16:57 -0000	1.8
  @@ -24,10 +24,10 @@
   import java.util.Iterator;
   import java.util.List;
   
  -import org.apache.log4j.Decoder;
   import org.apache.log4j.helpers.LogLog;
   import org.apache.log4j.plugins.Pauseable;
   import org.apache.log4j.plugins.Receiver;
  +import org.apache.log4j.spi.Decoder;
   import org.apache.log4j.spi.LoggingEvent;
   
   
  @@ -225,7 +225,8 @@
         while (!UDPReceiver.this.closed) {
           try {
             socket.receive(p);
  -
  +          
  +          LogLog.info("got data");
             //this string constructor which accepts a charset throws an exception if it is

             //null
             if (encoding == null) {
  
  
  
  1.6       +1 -1      logging-log4j/src/java/org/apache/log4j/net/MulticastReceiver.java
  
  Index: MulticastReceiver.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/net/MulticastReceiver.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MulticastReceiver.java	14 Apr 2004 05:38:12 -0000	1.5
  +++ MulticastReceiver.java	27 May 2004 12:16:57 -0000	1.6
  @@ -16,10 +16,10 @@
   
   package org.apache.log4j.net;
   
  -import org.apache.log4j.Decoder;
   import org.apache.log4j.helpers.LogLog;
   import org.apache.log4j.plugins.Pauseable;
   import org.apache.log4j.plugins.Receiver;
  +import org.apache.log4j.spi.Decoder;
   import org.apache.log4j.spi.LoggingEvent;
   
   import java.io.IOException;
  
  
  
  1.7       +4 -5      logging-log4j/src/java/org/apache/log4j/net/UDPAppender.java
  
  Index: UDPAppender.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/net/UDPAppender.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- UDPAppender.java	28 Mar 2004 10:04:31 -0000	1.6
  +++ UDPAppender.java	27 May 2004 12:16:57 -0000	1.7
  @@ -29,8 +29,6 @@
   
   
   /**
  - * 
  - * 
    *  Sends log information as a UDP datagrams.
    *
    *  <p>The UDPAppender is meant to be used as a diagnostic logging tool
  @@ -43,8 +41,8 @@
    *  By setting the remoteHost to a broadcast address any number of clients can
    *  listen for log messages.
    *
  - *  <p>This was inspired and really extended/copied from {@link SocketAppender}.
 Please
  - *  see the docs for the proper credit to the authors of that class.
  + *  <p>This was inspired and really extended/copied from {@link SocketAppender}.
  + *  Please see the docs for the proper credit to the authors of that class.
    *
    *  @author  <a href="mailto:kbrown@versatilesolutions.com">Kevin Brown</a>
    *  @author Scott Deboy <sdeboy@apache.org>
  @@ -206,7 +204,8 @@
         }
   
         try {
  -        StringBuffer buf=new StringBuffer(layout.format(event).trim());
  +        // TODO UDPAppender throws NullPointerException if the layout is not set
  +        StringBuffer buf = new StringBuffer(layout.format(event).trim());
           if (buf.length() < PACKET_LENGTH) {        
              buf.append(new char[PACKET_LENGTH - buf.length()]);
           }
  
  
  
  1.1                  logging-log4j/tests/input/net/socketServer6.properties
  
  Index: socketServer6.properties
  ===================================================================
  log4j.rootLogger=DEBUG, A
  log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
  log4j.Logger.org.apache.log4j.net.SocketNode=WARN
  log4j.appender.A=org.apache.log4j.FileAppender
  log4j.appender.A.file=output/temp
  log4j.appender.A.Append=false
  log4j.appender.A.layout=org.apache.log4j.PatternLayout
  log4j.appender.A.layout.ConversionPattern=%5p %x %X{hostID} %X{key6} [%t] %c{1} - %m%n
  
  
  
  1.1                  logging-log4j/tests/input/net/socketServer2.properties
  
  Index: socketServer2.properties
  ===================================================================
  log4j.rootLogger=DEBUG, A
  log4j.logger.org.apache.log4j.test.ShortSocketServer=WARN
  log4j.logger.org.apache.log4j.net.SocketNode=WARN
  log4j.appender.A=org.apache.log4j.FileAppender
  log4j.appender.A.file=output/temp
  log4j.appender.A.Append=false
  log4j.appender.A.layout=org.apache.log4j.PatternLayout
  log4j.appender.A.layout.ConversionPattern=%5p %x [%t] %C (%F:%L) %m%n
  
  
  
  
  1.1                  logging-log4j/tests/input/net/socketServer4.properties
  
  Index: socketServer4.properties
  ===================================================================
  log4j.rootLogger=DEBUG, A
  log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
  log4j.Logger.org.apache.log4j.net.SocketNode=WARN
  log4j.appender.A=org.apache.log4j.FileAppender
  log4j.appender.A.file=output/temp
  log4j.appender.A.Append=false
  log4j.appender.A.layout=org.apache.log4j.PatternLayout
  log4j.appender.A.layout.ConversionPattern=%5p %x %X{key1}%X{key4} [%t] %c{1} - %m%n
  
  
  
  1.1                  logging-log4j/tests/input/net/socketServer3.properties
  
  Index: socketServer3.properties
  ===================================================================
  log4j.rootLogger=DEBUG, A
  log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
  log4j.Logger.org.apache.log4j.net.SocketNode=WARN
  log4j.appender.A=org.apache.log4j.FileAppender
  log4j.appender.A.file=output/temp
  log4j.appender.A.Append=false
  log4j.appender.A.layout=org.apache.log4j.PatternLayout
  log4j.appender.A.layout.ConversionPattern=%5p %x [%t] %C (%F:%L) %m%n
  
  
  
  1.1                  logging-log4j/tests/input/net/socketServer1.properties
  
  Index: socketServer1.properties
  ===================================================================
  log4j.rootLogger=DEBUG, A
  log4j.logger.org.apache.log4j.test.ShortSocketServer=WARN
  log4j.logger.org.apache.log4j.net.SocketNode=WARN
  log4j.appender.A=org.apache.log4j.FileAppender
  log4j.appender.A.file=output/temp
  log4j.appender.A.Append=false
  log4j.appender.A.layout=org.apache.log4j.PatternLayout
  log4j.appender.A.layout.ConversionPattern=%5p %x [%t] %c %m%n
  
  
  
  
  1.1                  logging-log4j/tests/input/net/socketServer5.properties
  
  Index: socketServer5.properties
  ===================================================================
  log4j.rootLogger=DEBUG, A
  log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
  log4j.Logger.org.apache.log4j.net.SocketNode=WARN
  log4j.appender.A=org.apache.log4j.FileAppender
  log4j.appender.A.file=output/temp
  log4j.appender.A.Append=false
  log4j.appender.A.layout=org.apache.log4j.PatternLayout
  log4j.appender.A.layout.ConversionPattern=%5p %x %X{key1}%X{key5} [%t] %c{1} - %m%n
  
  
  
  1.1                  logging-log4j/tests/input/net/socketServer8.properties
  
  Index: socketServer8.properties
  ===================================================================
  log4j.rootLogger=DEBUG, A
  log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
  log4j.Logger.org.apache.log4j.net.SocketNode=WARN
  log4j.appender.A=org.apache.log4j.FileAppender
  log4j.appender.A.file=output/temp
  log4j.appender.A.Append=false
  log4j.appender.A.layout=org.apache.log4j.PatternLayout
  log4j.appender.A.layout.ConversionPattern=%5p %x %X{hostID} %X{key8} [%t] %c{1} - %m%n
  
  
  
  1.1                  logging-log4j/tests/input/net/socketServer7.properties
  
  Index: socketServer7.properties
  ===================================================================
  log4j.rootLogger=DEBUG, A
  log4j.Logger.org.apache.log4j.test.ShortSocketServer=WARN
  log4j.Logger.org.apache.log4j.net.SocketNode=WARN
  log4j.appender.A=org.apache.log4j.FileAppender
  log4j.appender.A.file=output/temp
  log4j.appender.A.Append=false
  log4j.appender.A.layout=org.apache.log4j.PatternLayout
  log4j.appender.A.layout.ConversionPattern=%5p %x %X{hostID} %X{key7} [%t] %c{1} - %m%n
  
  
  
  1.12      +8 -8      logging-log4j/tests/src/java/org/apache/log4j/net/SocketServerTestCase.java
  
  Index: SocketServerTestCase.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/log4j/net/SocketServerTestCase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SocketServerTestCase.java	15 May 2004 15:15:43 -0000	1.11
  +++ SocketServerTestCase.java	27 May 2004 12:16:58 -0000	1.12
  @@ -114,7 +114,7 @@
             new JunitTestRunnerFilter(),
             new SunReflectFilter() });
   
  -    assertTrue(Compare.compare(FILTERED, "witness/socketServer.1"));
  +    assertTrue(Compare.compare(FILTERED, "witness/net/socketServer.1"));
     }
   
     /**
  @@ -140,7 +140,7 @@
             new JunitTestRunnerFilter(),
             new SunReflectFilter() });
   
  -    assertTrue(Compare.compare(FILTERED, "witness/socketServer.2"));
  +    assertTrue(Compare.compare(FILTERED, "witness/net/socketServer.2"));
     }
   
     /**
  @@ -165,7 +165,7 @@
             new JunitTestRunnerFilter(),
             new SunReflectFilter() });
   
  -    assertTrue(Compare.compare(FILTERED, "witness/socketServer.3"));
  +    assertTrue(Compare.compare(FILTERED, "witness/net/socketServer.3"));
     }
   
     /**
  @@ -193,7 +193,7 @@
             new JunitTestRunnerFilter(),
             new SunReflectFilter() });
   
  -    assertTrue(Compare.compare(FILTERED, "witness/socketServer.4"));
  +    assertTrue(Compare.compare(FILTERED, "witness/net/socketServer.4"));
     }
   
     /**
  @@ -233,7 +233,7 @@
         new Filter[] { cf, new LineNumberFilter(), 
             new JunitTestRunnerFilter(),
             new SunReflectFilter() });
  -    assertTrue(Compare.compare(FILTERED, "witness/socketServer.5"));
  +    assertTrue(Compare.compare(FILTERED, "witness/net/socketServer.5"));
     }
   
     /**
  @@ -267,7 +267,7 @@
         new Filter[] { cf, new LineNumberFilter(), 
             new JunitTestRunnerFilter(),
             new SunReflectFilter() });
  -    assertTrue(Compare.compare(FILTERED, "witness/socketServer.6"));
  +    assertTrue(Compare.compare(FILTERED, "witness/net/socketServer.6"));
     }
   
     /**
  @@ -296,7 +296,7 @@
         new Filter[] { cf, new LineNumberFilter(), 
             new JunitTestRunnerFilter(),
             new SunReflectFilter() });
  -    assertTrue(Compare.compare(FILTERED, "witness/socketServer.7"));
  +    assertTrue(Compare.compare(FILTERED, "witness/net/socketServer.7"));
     }
   
     /**
  @@ -323,7 +323,7 @@
         new Filter[] { cf, new LineNumberFilter(), 
             new JunitTestRunnerFilter(),
             new SunReflectFilter() });
  -    assertTrue(Compare.compare(FILTERED, "witness/socketServer.8"));
  +    assertTrue(Compare.compare(FILTERED, "witness/net/socketServer.8"));
     }
   
     static void common(String dc, String key, String o) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message