You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2005/02/24 01:59:15 UTC

cvs commit: logging-log4j/src/java/org/apache/log4j AppenderSkeleton.java

carnold     2005/02/23 16:59:15

  Modified:    src/java/org/apache/log4j AppenderSkeleton.java
  Log:
  Iterating on Hivemind breakage
  
  Revision  Changes    Path
  1.37      +20 -18    logging-log4j/src/java/org/apache/log4j/AppenderSkeleton.java
  
  Index: AppenderSkeleton.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/AppenderSkeleton.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- AppenderSkeleton.java	18 Feb 2005 17:23:44 -0000	1.36
  +++ AppenderSkeleton.java	24 Feb 2005 00:59:15 -0000	1.37
  @@ -1,12 +1,12 @@
   /*
    * 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.
  @@ -32,7 +32,7 @@
    * @since 0.8.1
    */
   public abstract class AppenderSkeleton extends ComponentBase implements Appender, OptionHandler {
  -  
  +
     /**
      * The layout variable does not need to be set if the appender
      * implementation has its own layout.
  @@ -70,26 +70,26 @@
     protected boolean closed = false;
   
     /**
  -   * By default, an appender is not in working order. It must be configured 
  -   * first. 
  +   * By default, an appender is not in working order. It must be configured
  +   * first.
      */
     protected boolean active = false;
  -  
  +
     /**
      * The guard prevents an appender from repeatedly calling its own doAppend
      * method.
      */
     private boolean guard = false;
  -  
  +
     /**
      * Calls the {@link #activate} method.
  -   * 
  +   *
      * @deprecated Please call the activate() method instead.
      */
     public void activateOptions() {
       activate();
     }
  -  
  +
     /**
      * Default implementation called by sub-classes.
      */
  @@ -215,7 +215,7 @@
     public synchronized void doAppend(LoggingEvent event) {
       // WARNING: The guard check MUST be the first statement in the
       // doAppend() method.
  -    
  +
       // prevent re-entry.
       if (guard) {
         return;
  @@ -230,11 +230,13 @@
           return;
         }
   
  -      if (!this.active) {
  -        getNonFloodingLogger().error(
  -            "Attempted to log with inactive appender named [{}].", name);
  -        return;
  -      }
  +//   This breaks appenders written prior to 18 Feb 2005
  +//
  +//      if (!this.active) {
  +//        getNonFloodingLogger().error(
  +//            "Attempted to log with inactive appender named [{}].", name);
  +//        return;
  +//      }
   
         if (!isAsSevereAsThreshold(event.getLevel())) {
           return;
  @@ -242,7 +244,7 @@
   
         Filter f = this.headFilter;
   
  -FILTER_LOOP: 
  +FILTER_LOOP:
         while (f != null) {
           switch (f.decide(event)) {
           case Filter.DENY:
  @@ -298,7 +300,7 @@
     /**
      * Set the threshold level. All log events with lower level than the
      * threshold level are ignored by the appender.
  -   * 
  +   *
      * <p>
      * In configuration files this option is specified by setting the value of
      * the <b>Threshold</b> option to a level string, such as "DEBUG", "INFO"
  
  
  

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