logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject cvs commit: jakarta-log4j/tests/src/java/org/apache/log4j/customLogger/XLoggerTestC ase.java XLogger.java
Date Tue, 13 May 2003 16:43:49 GMT

Here is an abridged forward of my commit to the LOG4J/test directory.

>Date: 13 May 2003 16:33:20 -0000
>From: MAILER-DAEMON@apache.org
>To: ceki@apache.org
>Subject: failure notice
>
>Hi. This is the qmail-send program at apache.org.
>I'm afraid I wasn't able to deliver your message to the following addresses.
>This is a permanent error; I've given up. Sorry it didn't work out.
>
><log4j-dev@jakarta.apache.org>:
>ezmlm-reject: fatal: Sorry, I don't accept messages larger than 100000 
>bytes (#5.2.3)
>
>--- Below this line is a copy of the message.
>
>Date: 13 May 2003 16:33:18 -0000
>Message-ID: <20030513163318.20594.qmail@icarus.apache.org>
>From: ceki@apache.org
>To: jakarta-log4j-cvs@apache.org
>Subject: cvs commit: 
>jakarta-log4j/tests/src/java/org/apache/log4j/customLogger 
>XLoggerTestCase.java XLogger.java
>
>ceki        2003/05/13 09:33:16
>
>   Modified:    tests/src/java/org/apache/log4j/util SunReflectFilter.java
>                         ISO8601Filter.java RelativeTimeFilter.java
>                         AbsoluteTimeFilter.java ControlFilter.java
>                         Compare.java AbsoluteDateAndTimeFilter.java
>                         LineNumberFilter.java XMLTimestampFilter.java
>                         XMLLineAttributeFilter.java
>                tests/src/java/org/apache/log4j AsyncAppenderTestCase.java
>                         PatternLayoutTestCase.java VectorAppender.java
>                         LoggerTestCase.java MinimumTestCase.java
>                         HierarchyThresholdTestCase.java DRFATestCase.java
>                tests/src/java/org/apache/log4j/defaultInit TestCase4.java
>                         TestCase3.java TestCase2.java TestCase1.java
>                tests/src/java/org/apache/log4j/xml CustomLevelTestCase.java
>                         XLevel.java XMLLayoutTestCase.java
>                tests/src/java/org/apache/log4j/varia
>                         LevelMatchFilterTestCase.java
>                         ErrorHandlerTestCase.java
>                         LevelRangeFilterTestCase.java
>                tests/src/java/org/apache/log4j/net
>                         SocketServerTestCase.java ShortSocketServer.java
>                tests/src/java/org/apache/log4j/or ORTestCase.java
>                tests/src/java/org/apache/log4j/plugins PluginTestCase.java
>                tests/src/java/org/apache/log4j/helpers
>                         BoundedFIFOTestCase.java CyclicBufferTestCase.java
>                tests/src/java/org/apache/log4j/customLogger
>                         XLoggerTestCase.java XLogger.java
>   Log:
>
>   - Removed unused import statements
>   - Formatted with jalopy
>
>
>   Revision  Changes    Path
>   1.2       +48 
> -8     jakarta-log4j/tests/src/java/org/apache/log4j/util/SunReflectFilter.java
>
>   Index: SunReflectFilter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/SunReflectFilter.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- SunReflectFilter.java     13 Nov 2002 16:44:54 -0000      1.1
>   +++ SunReflectFilter.java     13 May 2003 16:33:14 -0000      1.2
>   @@ -1,22 +1,62 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>   -public class SunReflectFilter implements Filter {
>
>   +public class SunReflectFilter implements Filter {
>      Perl5Util util = new Perl5Util();
>
>      public String filter(String in) {
>   -    if(util.match("/at sun.reflect/", in)) {
>   +    if (util.match("/at sun.reflect/", in)) {
>          return null;
>        } else {
>          return in;
>
>
>
>   1.5       +52 
> -13    jakarta-log4j/tests/src/java/org/apache/log4j/util/ISO8601Filter.java
>
>   Index: ISO8601Filter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/ISO8601Filter.java,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- ISO8601Filter.java        25 Apr 2002 21:17:36 -0000      1.4
>   +++ ISO8601Filter.java        13 May 2003 16:33:14 -0000      1.5
>   @@ -1,26 +1,65 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>   -public class ISO8601Filter implements Filter {
>
>   +public class ISO8601Filter implements Filter {
>      Perl5Util util = new Perl5Util();
>   -
>   -  public
>   -  String filter(String in) {
>   -    String pat = "/"+ISO8601_PAT +"/";
>
>   -    if(util.match(pat, in)) {
>   -      return util.substitute("s/"+ISO8601_PAT+"//", in);
>   +  public String filter(String in) {
>   +    String pat = "/" + ISO8601_PAT + "/";
>   +
>   +    if (util.match(pat, in)) {
>   +      return util.substitute("s/" + ISO8601_PAT + "//", in);
>        } else {
>          return in;
>        }
>
>
>
>   1.4       +52 
> -13 
> jakarta-log4j/tests/src/java/org/apache/log4j/util/RelativeTimeFilter.java
>
>   Index: RelativeTimeFilter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/RelativeTimeFilter.java,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- RelativeTimeFilter.java   25 Apr 2002 21:17:36 -0000      1.3
>   +++ RelativeTimeFilter.java   13 May 2003 16:33:14 -0000      1.4
>   @@ -1,27 +1,66 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>   -public class RelativeTimeFilter implements Filter {
>
>   +public class RelativeTimeFilter implements Filter {
>      Perl5Util util = new Perl5Util();
>   -
>   -  public
>   -  String filter(String in) {
>   -    String pat = "/"+Filter.RELATIVE_TIME_PAT+"/";
>
>   -    if(util.match(pat, in)) {
>   +  public String filter(String in) {
>   +    String pat = "/" + Filter.RELATIVE_TIME_PAT + "/";
>   +
>   +    if (util.match(pat, in)) {
>          //System.out.println("Removing relative time from line ["+in+"]");
>   -      return util.substitute("s/"+Filter.RELATIVE_TIME_PAT+"//", in);
>   +      return util.substitute("s/" + Filter.RELATIVE_TIME_PAT + "//", in);
>        } else {
>          return in;
>        }
>
>
>
>   1.3       +51 
> -13 
> jakarta-log4j/tests/src/java/org/apache/log4j/util/AbsoluteTimeFilter.java
>
>   Index: AbsoluteTimeFilter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/AbsoluteTimeFilter.java,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- AbsoluteTimeFilter.java   25 Apr 2002 21:17:36 -0000      1.2
>   +++ AbsoluteTimeFilter.java   13 May 2003 16:33:14 -0000      1.3
>   @@ -1,26 +1,64 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>    public class AbsoluteTimeFilter implements Filter {
>   -
>      Perl5Util util = new Perl5Util();
>   -
>   -  public
>   -  String filter(String in) {
>   -    String pat = "/"+Filter.ABSOLUTE_TIME_PAT+"/";
>
>   -    if(util.match(pat, in)) {
>   -      return util.substitute("s/"+Filter.ABSOLUTE_TIME_PAT+"//", in);
>   +  public String filter(String in) {
>   +    String pat = "/" + Filter.ABSOLUTE_TIME_PAT + "/";
>   +
>   +    if (util.match(pat, in)) {
>   +      return util.substitute("s/" + Filter.ABSOLUTE_TIME_PAT + "//", in);
>        } else {
>          return in;
>        }
>
>
>
>   1.5       +55 
> -16    jakarta-log4j/tests/src/java/org/apache/log4j/util/ControlFilter.java
>
>   Index: ControlFilter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/ControlFilter.java,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- ControlFilter.java        25 Apr 2002 21:17:36 -0000      1.4
>   +++ ControlFilter.java        13 May 2003 16:33:14 -0000      1.5
>   @@ -1,37 +1,76 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>   -public class ControlFilter implements Filter {
>
>   +public class ControlFilter implements Filter {
>      Perl5Util util = new Perl5Util();
>   -
>      String[] allowedPatterns;
>
>      public ControlFilter(String[] allowedPatterns) {
>        this.allowedPatterns = allowedPatterns;
>      }
>
>   -  public
>   -  String filter(String in) throws UnexpectedFormatException{
>   +  public String filter(String in) throws UnexpectedFormatException {
>        int len = allowedPatterns.length;
>   -    for(int i = 0; i < len; i++) {
>   +
>   +    for (int i = 0; i < len; i++) {
>          //System.out.println("["+allowedPatterns[i]+"]");
>   -      if(util.match("/"+allowedPatterns[i]+"/", in)) {
>   -     //System.out.println("["+in+"] matched ["+allowedPatterns[i]);
>   -     return in;
>   -      }
>   +      if (util.match("/" + allowedPatterns[i] + "/", in)) {
>   +        //System.out.println("["+in+"] matched ["+allowedPatterns[i]);
>   +        return in;
>   +      }
>        }
>
>   -    throw new UnexpectedFormatException("["+in+"]");
>   +    throw new UnexpectedFormatException("[" + in + "]");
>      }
>    }
>
>
>
>   1.7       +82 
> -35    jakarta-log4j/tests/src/java/org/apache/log4j/util/Compare.java
>
>   Index: Compare.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/Compare.java,v
>   retrieving revision 1.6
>   retrieving revision 1.7
>   diff -u -r1.6 -r1.7
>   --- Compare.java      19 Dec 2002 07:55:29 -0000      1.6
>   +++ Compare.java      13 May 2003 16:33:14 -0000      1.7
>   @@ -1,69 +1,116 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.InputStream;
>   -import java.io.FileInputStream;
>   -import java.io.FileReader;
>    import java.io.BufferedReader;
>    import java.io.FileNotFoundException;
>   +import java.io.FileReader;
>    import java.io.IOException;
>
>   -public class Compare {
>
>   +public class Compare {
>      static final int B1_NULL = -1;
>      static final int B2_NULL = -2;
>   -
>   -  static
>   -  public
>   -  boolean compare(String file1, String file2) throws 
> FileNotFoundException,
>   -                                                            IOException {
>   +
>   +  public static boolean compare(String file1, String file2)
>   +    throws FileNotFoundException, IOException {
>        BufferedReader in1 = new BufferedReader(new FileReader(file1));
>        BufferedReader in2 = new BufferedReader(new FileReader(file2));
>   -
>   +
>        String s1;
>        int lineCounter = 0;
>   -    while((s1 = in1.readLine()) != null) {
>   +
>   +    while ((s1 = in1.readLine()) != null) {
>          lineCounter++;
>   +
>          String s2 = in2.readLine();
>   -      if(!s1.equals(s2)) {
>   -        System.out.println("Files ["+file1+"] and ["+file2+"] differ 
> on line "
>   -                        +lineCounter);
>   -             System.out.println("One reads:  ["+s1+"].");
>   -             System.out.println("Other reads:["+s2+"].");
>   -             outputFile(file1);
>   -             outputFile(file2);
>   -             return false;
>   +
>   +      if (!s1.equals(s2)) {
>   +        System.out.println(
>   +          "Files [" + file1 + "] and [" + file2 + "] differ on line "
>   +          + lineCounter);
>   +        System.out.println("One reads:  [" + s1 + "].");
>   +        System.out.println("Other reads:[" + s2 + "].");
>   +        outputFile(file1);
>   +        outputFile(file2);
>   +
>   +        return false;
>          }
>        }
>   -
>   +
>        // the second file is longer
>   -    if(in2.read() != -1) {
>   -      System.out.println("File ["+file2+"] longer than file 
> ["+file1+"].");
>   -     outputFile(file1);
>   -     outputFile(file2);
>   +    if (in2.read() != -1) {
>   +      System.out.println(
>   +        "File [" + file2 + "] longer than file [" + file1 + "].");
>   +      outputFile(file1);
>   +      outputFile(file2);
>   +
>          return false;
>        }
>   -
>   +
>        return true;
>      }
>   -
>   -  private static void outputFile(String file) throws 
> FileNotFoundException,
>   -                                                            IOException {
>   +
>   +  private static void outputFile(String file)
>   +    throws FileNotFoundException, IOException {
>        BufferedReader in1 = new BufferedReader(new FileReader(file));
>   -
>   +
>        String s1;
>        int lineCounter = 0;
>        System.out.println("--------------------------------");
>        System.out.println("Contents of " + file + ":");
>   -    while((s1 = in1.readLine()) != null) {
>   +
>   +    while ((s1 = in1.readLine()) != null) {
>          lineCounter++;
>          System.out.print(lineCounter);
>   +
>          if (lineCounter < 10) {
>            System.out.print("   : ");
>          } else if (lineCounter < 100) {
>   @@ -73,8 +120,8 @@
>          } else {
>            System.out.print(": ");
>          }
>   +
>          System.out.println(s1);
>        }
>      }
>   -
>    }
>
>
>
>   1.2       +55 
> -9 
> jakarta-log4j/tests/src/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java
>
>   Index: AbsoluteDateAndTimeFilter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- AbsoluteDateAndTimeFilter.java    6 Apr 2002 17:52:07 -0000       1.1
>   +++ AbsoluteDateAndTimeFilter.java    13 May 2003 16:33:14 -0000      1.2
>   @@ -1,20 +1,66 @@
>   +/*
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>   + *
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>   -public class AbsoluteDateAndTimeFilter implements Filter {
>
>   +public class AbsoluteDateAndTimeFilter implements Filter {
>      Perl5Util util = new Perl5Util();
>   -
>   -  public
>   -  String filter(String in) {
>   -    String pat = "/"+Filter.ABSOLUTE_DATE_AND_TIME_PAT+"/";
>
>   -    if(util.match(pat, in)) {
>   -      return 
> util.substitute("s/"+Filter.ABSOLUTE_DATE_AND_TIME_PAT+"//", in);
>   +  public String filter(String in) {
>   +    String pat = "/" + Filter.ABSOLUTE_DATE_AND_TIME_PAT + "/";
>   +
>   +    if (util.match(pat, in)) {
>   +      return util.substitute(
>   +        "s/" + Filter.ABSOLUTE_DATE_AND_TIME_PAT + "//", in);
>        } else {
>          return in;
>        }
>
>
>
>   1.4       +51 
> -13    jakarta-log4j/tests/src/java/org/apache/log4j/util/LineNumberFilter.java
>
>   Index: LineNumberFilter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/LineNumberFilter.java,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- LineNumberFilter.java     13 Nov 2002 16:44:54 -0000      1.3
>   +++ LineNumberFilter.java     13 May 2003 16:33:14 -0000      1.4
>   @@ -1,28 +1,66 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>   -public class LineNumberFilter implements Filter {
>
>   +public class LineNumberFilter implements Filter {
>      Perl5Util util = new Perl5Util();
>
>   -  public
>   -  String filter(String in) {
>   -    if(util.match("/\\(.*:\\d{1,4}\\)/", in)) {
>   +  public String filter(String in) {
>   +    if (util.match("/\\(.*:\\d{1,4}\\)/", in)) {
>          return util.substitute("s/\\(.*:\\d{1,4}\\)/\\(X\\)/", in);
>   -
>        } else if (util.match("/\\(Native Method\\)/", in)) {
>   -      return util.substitute("s/\\(Native Method\\)/\\(X\\)/", in);
>   -    }else {
>   +      return util.substitute("s/\\(Native Method\\)/\\(X\\)/", in);
>   +    } else {
>          return in;
>        }
>      }
>
>
>
>   1.2       +51 
> -11 
> jakarta-log4j/tests/src/java/org/apache/log4j/util/XMLTimestampFilter.java
>
>   Index: XMLTimestampFilter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/XMLTimestampFilter.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- XMLTimestampFilter.java   25 Apr 2002 21:17:36 -0000      1.1
>   +++ XMLTimestampFilter.java   13 May 2003 16:33:14 -0000      1.2
>   @@ -1,24 +1,64 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>   -public class XMLTimestampFilter implements Filter {
>
>   +public class XMLTimestampFilter implements Filter {
>      Perl5Util util = new Perl5Util();
>
>   -  public
>   -  String filter(String in) {
>   -    if(util.match("/timestamp=\"\\d{10,13}\"/", in)) {
>   -      return 
> util.substitute("s/timestamp=\"\\d{10,13}\"/timestamp=\"XXX\"/", in);
>   +  public String filter(String in) {
>   +    if (util.match("/timestamp=\"\\d{10,13}\"/", in)) {
>   +      return util.substitute(
>   +        "s/timestamp=\"\\d{10,13}\"/timestamp=\"XXX\"/", in);
>        } else {
>          return in;
>        }
>
>
>
>   1.2       +50 
> -11 
> jakarta-log4j/tests/src/java/org/apache/log4j/util/XMLLineAttributeFilter.java
>
>   Index: XMLLineAttributeFilter.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/util/XMLLineAttributeFilter.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- XMLLineAttributeFilter.java       29 Apr 2002 14:41:23 -0000      1.1
>   +++ XMLLineAttributeFilter.java       13 May 2003 16:33:14 -0000      1.2
>   @@ -1,25 +1,64 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j.util;
>
>   -import java.io.*;
>   -
>    import org.apache.oro.text.perl.Perl5Util;
>
>   -public class XMLLineAttributeFilter implements Filter {
>
>   +public class XMLLineAttributeFilter implements Filter {
>      Perl5Util util = new Perl5Util();
>
>   -  public
>   -  String filter(String in) {
>   -    if(util.match("/line=\"\\d{1,3}\"/", in)) {
>   +  public String filter(String in) {
>   +    if (util.match("/line=\"\\d{1,3}\"/", in)) {
>          return util.substitute("s/line=\"\\d{1,3}\"/line=\"X\"/", in);
>   -    } else if(util.match("/line=\"?\"/", in)) {
>   +    } else if (util.match("/line=\"?\"/", in)) {
>          return util.substitute("s/line=\"?\"/line=\"X\"/", in);
>        } else {
>          return in;
>
>
>
>   1.3       +58 
> -20    jakarta-log4j/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java
>
>   Index: AsyncAppenderTestCase.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- AsyncAppenderTestCase.java        9 Oct 2002 22:50:07 -0000       1.2
>   +++ AsyncAppenderTestCase.java        13 May 2003 16:33:15 -0000      1.3
>   @@ -1,26 +1,65 @@
>    /*
>   - * Copyright (C) The Apache Software Foundation. All rights reserved.
>   + * 
> ============================================================================
>   + *                   The Apache Software License, Version 1.1
>   + * 
> ============================================================================
>     *
>   - * 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.  */
>   + *    Copyright (C) 1999 The Apache Software Foundation. All rights 
> reserved.
>   + *
>   + * Redistribution and use in source and binary forms, with or without 
> modifica-
>   + * tion, are permitted provided that the following conditions are met:
>   + *
>   + * 1. Redistributions of  source code must  retain the above 
> copyright  notice,
>   + *    this list of conditions and the following disclaimer.
>   + *
>   + * 2. Redistributions in binary form must reproduce the above 
> copyright notice,
>   + *    this list of conditions and the following disclaimer in the 
> documentation
>   + *    and/or other materials provided with the distribution.
>   + *
>   + * 3. The end-user documentation included with the redistribution, if 
> any, must
>   + *    include  the following  acknowledgment:  "This product 
> includes  software
>   + *    developed  by the  Apache Software 
> Foundation  (http://www.apache.org/)."
>   + *    Alternately, this  acknowledgment may  appear in the software 
> itself,  if
>   + *    and wherever such third-party acknowledgments normally appear.
>   + *
>   + * 4. The names "log4j" and  "Apache Software Foundation"  must not be 
> used to
>   + *    endorse  or promote  products derived  from this  software 
> without  prior
>   + *    written permission. For written permission, please contact
>   + *    apache@apache.org.
>   + *
>   + * 5. Products  derived from this software may not  be called 
> "Apache", nor may
>   + *    "Apache" appear  in their name,  without prior written 
> permission  of the
>   + *    Apache Software Foundation.
>   + *
>   + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
> WARRANTIES,
>   + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
> MERCHANTABILITY AND
>   + * FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT 
> SHALL  THE
>   + * APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
> FOR  ANY DIRECT,
>   + * INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR 
> CONSEQUENTIAL  DAMAGES (INCLU-
>   + * DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
> SERVICES; LOSS
>   + * OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
> CAUSED AND ON
>   + * ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
> LIABILITY,  OR TORT
>   + * (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF 
> THE  USE OF
>   + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   + *
>   + * This software  consists of voluntary contributions made  by many 
> individuals
>   + * on  behalf of the Apache Software  Foundation.  For 
> more  information on the
>   + * Apache Software Foundation, please see <http://www.apache.org/>.
>   + *
>   + */
>
>    package org.apache.log4j;
>
>   +import junit.framework.Test;
>    import junit.framework.TestCase;
>    import junit.framework.TestSuite;
>   -import junit.framework.Test;
>
>    import java.util.Vector;
>
>   -import org.apache.log4j.*;
>   -import org.apache.log4j.performance.NullAppender;
>
>    /**
>       A superficial but general test of log4j.
>     */
>    public class AsyncAppenderTestCase extends TestCase {
>   -
>      public AsyncAppenderTestCase(String name) {
>        super(name);
>      }
>   @@ -33,19 +72,19 @@
>      }
>
>      // this test checks whether it is possible to write to a closed 
> AsyncAppender
>   -  public void closeTest() throws Exception {
>   +  public void closeTest() throws Exception {
>        Logger root = Logger.getRootLogger();
>        Layout layout = new SimpleLayout();
>        VectorAppender vectorAppender = new VectorAppender();
>        AsyncAppender asyncAppender = new AsyncAppender();
>        asyncAppender.setName("async-CloseTest");
>        asyncAppender.addAppender(vectorAppender);
>   -    root.addAppender(asyncAppender);
>   +    root.addAppender(asyncAppender);
>
>        root.debug("m1");
>        asyncAppender.close();
>        root.debug("m2");
>   -
>   +
>        Vector v = vectorAppender.getVector();
>        assertEquals(v.size(), 1);
>      }
>   @@ -59,12 +98,12 @@
>        AsyncAppender asyncAppender = new AsyncAppender();
>        asyncAppender.setName("async-test2");
>        asyncAppender.addAppender(vectorAppender);
>   -    root.addAppender(asyncAppender);
>   +    root.addAppender(asyncAppender);
>
>        root.debug("m1");
>        asyncAppender.close();
>        root.debug("m2");
>   -
>   +
>        Vector v = vectorAppender.getVector();
>        assertEquals(v.size(), 1);
>        assertTrue(vectorAppender.isClosed());
>   @@ -80,29 +119,28 @@
>        AsyncAppender asyncAppender = new AsyncAppender();
>        asyncAppender.setName("async-test3");
>        asyncAppender.addAppender(vectorAppender);
>   -    root.addAppender(asyncAppender);
>   +    root.addAppender(asyncAppender);
>
>   -    for(int i = 0; i < LEN; i++) {
>   -      root.debug("message"+i);
>   +    for (int i = 0; i < LEN; i++) {
>   +      root.debug("message" + i);
>        }
>   -
>   +
>        System.out.println("Done loop.");
>        System.out.flush();
>        asyncAppender.close();
>        root.debug("m2");
>   -
>   +
>        Vector v = vectorAppender.getVector();
>        assertEquals(v.size(), LEN);
>        assertTrue(vectorAppender.isClosed());
>      }
>
>   -
>      public static Test suite() {
>        TestSuite suite = new TestSuite();
>        suite.addTest(new AsyncAppenderTestCase("closeTest"));
>        suite.addTest(new AsyncAppenderTestCase("test2"));
>        suite.addTest(new AsyncAppenderTestCase("test3"));
>   +
>        return suite;
>      }
>   -
>    }

[large snip so that this message fits into 100Kb]



--
Ceki  For log4j documentation consider "The complete log4j manual"
       http://www.qos.ch/shop/products/clm_t.jsp 


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


Mime
View raw message