ceki        01/07/25 12:43:44

  Modified:    src/java/org/apache/log4j AppenderSkeleton.java
                        Category.java DailyRollingFileAppender.java
                        FileAppender.java HTMLLayout.java Hierarchy.java
                        WriterAppender.java
               src/java/org/apache/log4j/net JMSAppender.java
                        SMTPAppender.java SocketAppender.java
                        SyslogAppender.java
               src/java/org/apache/log4j/test Makefile
  Log:
  - Added the addHierarchyEventListener method to Hierarchy.
  
  - Removed a bunch of deprecated stuff from Appenders.
  
  - Corrected the restart bug DailyRollingFileAppender.
  
  Revision  Changes    Path
  1.15      +0 -41     jakarta-log4j/src/java/org/apache/log4j/AppenderSkeleton.java
  
  Index: AppenderSkeleton.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/AppenderSkeleton.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AppenderSkeleton.java     2001/07/13 07:52:43     1.14
  +++ AppenderSkeleton.java     2001/07/25 19:43:43     1.15
  @@ -26,20 +26,6 @@
      @author Ceki Gülcü */
   public abstract class AppenderSkeleton implements Appender, OptionHandler {
   
  -  /**
  -     A string constant used in naming the option for setting the
  -     threshold for the appender. See also {@link #setThreshold
  -     setThreshold} method. Current value of this string constant is
  -     <b>Threshold</b>.
  -
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -     
  -  */
  -  public static final String THRESHOLD_OPTION = "Threshold";
  -
  -
     /** The layout variable does not need to be set if the appender
         implementation has its own layout. */
     protected Layout layout;
  @@ -182,22 +168,6 @@
     }
   
     /**
  -     Returns the string array {{@link #THRESHOLD_OPTION}}.
  -
  -     <p>Configurable appenders must override this method to return the
  -     additional options they accept.  
  -     
  -     @deprecated We now use JavaBeans introspection to configure
  -     components. Options strings are no longer needed.
  -   */
  -  public
  -  String[] getOptionStrings() {
  -    return new String[] {THRESHOLD_OPTION};
  -  }
  -
  -  
  -
  -  /**
        Returns this appenders threshold priority. See the {@link
        #setThreshold} method for the meaning of this option.
        
  @@ -288,17 +258,6 @@
     }
   
   
  -  /**
  -     @deprecated Use the setter method for the option directly instead
  -     of the generic <code>setOption</code> method. 
  -  */
  -  public
  -  void setOption(String key, String value) {
  -    if(key.equalsIgnoreCase(THRESHOLD_OPTION)) {
  -      threshold = Priority.toPriority(value);
  -    }
  -  }
  -  
     /**
        Set the threshold priority. All log events with lower priority
        than the threshold priority are ignored by the appender.
  
  
  
  1.37      +1 -0      jakarta-log4j/src/java/org/apache/log4j/Category.java
  
  Index: Category.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Category.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Category.java     2001/07/13 07:52:48     1.36
  +++ Category.java     2001/07/25 19:43:43     1.37
  @@ -217,6 +217,7 @@
         aai = new AppenderAttachableImpl();
       }
       aai.addAppender(newAppender);
  +    hierarchy.fireAddAppenderEvent(this, newAppender);
     }
   
     /**
  
  
  
  1.15      +14 -2     
jakarta-log4j/src/java/org/apache/log4j/DailyRollingFileAppender.java
  
  Index: DailyRollingFileAppender.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/DailyRollingFileAppender.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DailyRollingFileAppender.java     2001/07/20 16:57:15     1.14
  +++ DailyRollingFileAppender.java     2001/07/25 19:43:43     1.15
  @@ -210,7 +210,12 @@
         int type = computeCheckPeriod();
         printPeriodicity(type);
         rc.setType(type);
  -      scheduledFilename = fileName+sdf.format(now);
  +      File file = new File(fileName);
  +      if(file.exists()) {
  +     scheduledFilename = fileName+sdf.format(new Date(file.lastModified()));
  +      } else {
  +     scheduledFilename = fileName+sdf.format(now);
  +      }
       } else {
         LogLog.error("Either Filename or DatePattern options are not set for ["+
                   name+"].");
  @@ -279,8 +284,9 @@
       }
   
       String datedFilename = fileName+sdf.format(now);
  -    if (scheduledFilename.equals(datedFilename)) 
  +    if (scheduledFilename.equals(datedFilename)) {
         return;
  +    }
   
       // close current file, and rename it to datedFilename
       this.closeFile(); 
  @@ -308,6 +314,12 @@
     /**
        This method differentiates DailyRollingFileAppender from its
        super class.
  +
  +     <p>Before actually logging, this method will check whether it is
  +     time to do a rollover. If it is, it will schedule the next
  +     rollover time and then rollover.
  +
  +
     */
     protected 
     void subAppend(LoggingEvent event) {
  
  
  
  1.24      +3 -0      jakarta-log4j/src/java/org/apache/log4j/FileAppender.java
  
  Index: FileAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/FileAppender.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- FileAppender.java 2001/07/20 16:57:15     1.23
  +++ FileAppender.java 2001/07/25 19:43:43     1.24
  @@ -238,6 +238,8 @@
     public
     synchronized
     void setFile(String fileName, boolean append) throws IOException {
  +    LogLog.debug("setFile called: "+fileName+", "+append);
  +
       reset();
       this.setQWForFiles(new FileWriter(fileName, append));
       //this.tp = new TracerPrintWriter(qw);
  @@ -245,6 +247,7 @@
       this.fileAppend = append;
       this.qwIsOurs = true;
       writeHeader();
  +    LogLog.debug("setFile ended");
     }
   
   
  
  
  
  1.22      +0 -41     jakarta-log4j/src/java/org/apache/log4j/HTMLLayout.java
  
  Index: HTMLLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/HTMLLayout.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- HTMLLayout.java   2001/07/13 07:52:59     1.21
  +++ HTMLLayout.java   2001/07/25 19:43:43     1.22
  @@ -56,47 +56,6 @@
     String title = "Log4J Log Messages";
   
     /**
  -     Returns a String consisting of one element {@link
  -     #LOCATION_INFO_OPTION}. 
  -     
  -     @deprecated We now use JavaBeans introspection to configure
  -     components. Options strings are no longer needed.
  - */
  -  public
  -  String[] getOptionStrings() {
  -    return new String[] {LOCATION_INFO_OPTION, TITLE_OPTION};
  -  }
  -
  -  /**
  -     Set HTMLLayout specific options.
  -
  -     <p>The <b>LocationInfo</b> option takes a boolean value. By
  -     default, it is set to false which means there will be no location
  -     information output by this layout. If the the option is set to
  -     true, then the file name and line number of the statement
  -     at the origin of the log statement will be output. 
  -
  -     <p>If you are embedding this layout within an {@link
  -     org.apache.log4j.net.SMTPAppender} then make sure to set the
  -     <b>LocationInfo</b> option of that appender as well.
  -     
  -     @deprecated Use the setter method for the option directly instead
  -     of the generic <code>setOption</code> method. 
  -
  -   */
  -  public
  -  void setOption(String key, String value) {
  -    if(value == null) return;
  -
  -    if (key.equalsIgnoreCase(LOCATION_INFO_OPTION)) {
  -      locationInfo = OptionConverter.toBoolean(value, locationInfo);
  -    }
  -    else if (key.equalsIgnoreCase(TITLE_OPTION)) {
  -      title = value;
  -    }
  -  }
  -  
  -  /**
        The <b>LocationInfo</b> option takes a boolean value. By
        default, it is set to false which means there will be no location
        information output by this layout. If the the option is set to
  
  
  
  1.21      +10 -3     jakarta-log4j/src/java/org/apache/log4j/Hierarchy.java
  
  Index: Hierarchy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Hierarchy.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Hierarchy.java    2001/07/20 16:03:41     1.20
  +++ Hierarchy.java    2001/07/25 19:43:44     1.21
  @@ -64,7 +64,7 @@
     static final int DISABLE_OVERRIDE = -2;  
     
     private CategoryFactory defaultFactory;
  -  private Vector  listeners;
  +  private Vector listeners;
   
     Hashtable ht;
     Category root;
  @@ -101,6 +101,14 @@
       rendererMap.put(classToRender, or);
     }
     
  +  public 
  +  void addHierarchyEventListener(HierarchyEventListener listener) {
  +    if(listeners.contains(listener)) {
  +      LogLog.warn("Ignoring attempt to add an existent listener.");
  +    } else {
  +      listeners.add(listener);
  +    }
  +  }
   
     /**
        This call will clear all category definitions from the internal
  @@ -234,7 +242,7 @@
       disable = DISABLE_OFF;
     }
   
  -  private
  +  
     void fireAddAppenderEvent(Category category, Appender appender) {
       if(listeners != null) {
         int size = listeners.size();
  @@ -247,7 +255,6 @@
     }
   
   
  -  private
     void fireRemoveAppenderEvent(Category category, Appender appender) {
       if(listeners != null) {
         int size = listeners.size();
  
  
  
  1.17      +1 -1      jakarta-log4j/src/java/org/apache/log4j/WriterAppender.java
  
  Index: WriterAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/WriterAppender.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- WriterAppender.java       2001/07/20 16:57:15     1.16
  +++ WriterAppender.java       2001/07/25 19:43:44     1.17
  @@ -306,7 +306,7 @@
       }
     }
   
  -/**
  +  /**
        Write a header as produced by the embedded layout's {@link
        Layout#getHeader} method.  */
     protected 
  
  
  
  1.11      +1 -79     jakarta-log4j/src/java/org/apache/log4j/net/JMSAppender.java
  
  Index: JMSAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/JMSAppender.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JMSAppender.java  2001/04/03 16:37:23     1.10
  +++ JMSAppender.java  2001/07/25 19:43:44     1.11
  @@ -27,36 +27,7 @@
      @author Ceki G&uuml;lc&uuml;
   */
   public class JMSAppender extends AppenderSkeleton {
  -  /**
  -     A string constant used in naming the topic connection factory
  -     binding name option.  output file. Current value of this string
  -     constant is <b>TopicConnectionFactoryBindingName</b>.
  -
  -     <p>Note that all option keys are case sensitive.
  -     
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -  */
  -  public static final String TOPIC_CONNECTION_FACTORY_BINDING_NAME_OPTION 
  -                                                 = 
"TopicConnectionFactoryBindingName";
  -
  -  /**
  -     A string constant used in naming the topic binding name option.
  -     Current value of this string constant is <b>TopicBindingName</b>.
  -
  -     <p>Note that all option keys are case sensitive.
  -     
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -  */
  -  public static final String TOPIC_BINDING_NAME_OPTION = "TopicBindingName";
  -
  + 
     TopicConnection  topicConnection;
     TopicSession topicSession;
     TopicPublisher  topicPublisher;
  @@ -67,55 +38,6 @@
     JMSAppender() {
     }
   
  - /**
  -     Retuns the option names for this component, namely the string
  -     array {@link #TOPIC_BINDING_NAME_OPTION}, {@link
  -     #TOPIC_CONNECTION_FACTORY_BINDING_NAME_OPTION} in addition to the
  -     options of its super class {@link AppenderSkeleton}.
  -     
  -     @deprecated We now use JavaBeans introspection to configure
  -     components. Options strings are no longer needed.
  -  */
  -  
  -  public
  -  String[] getOptionStrings() {
  -    return OptionConverter.concatanateArrays(super.getOptionStrings(),
  -          new String[] {TOPIC_BINDING_NAME_OPTION, 
  -                       TOPIC_CONNECTION_FACTORY_BINDING_NAME_OPTION});
  -  }
  -
  - /**
  -     Set <code>JMSAppender</code> specific options.
  -          
  -     The options of the super class {@link AppenderSkeleton} are also
  -     recognized.
  -
  -     <p>The <b>TopicConnectionFactoryBindingName</b> option takes a
  -     string value. Its value will be used to lookup the appropriate
  -     <code>TopicConnectionFactory</code> from the JNDI context.
  -
  -     <p>The <b>TopicBindingName</b> option takes a
  -     string value. Its value will be used to lookup the appropriate
  -     <code>Topic</code> from the JNDI context.         
  -     
  -     
  -     @deprecated Use the setter method for the option directly instead
  -     of the generic <code>setOption</code> method. 
  -
  - */
  -
  -  public
  -  void setOption(String key, String value) {
  -    if(value == null) return;
  -    super.setOption(key, value);    
  -    
  -    if(key.equals(TOPIC_BINDING_NAME_OPTION)) 
  -      topicBindingName = value;
  -    else if(key.equals(TOPIC_CONNECTION_FACTORY_BINDING_NAME_OPTION)) {
  -      tcfBindingName = value;
  -    }
  -  }
  -  
     /**
        The <b>TopicConnectionFactoryBindingName</b> option takes a
        string value. Its value will be used to lookup the appropriate
  
  
  
  1.25      +1 -135    jakarta-log4j/src/java/org/apache/log4j/net/SMTPAppender.java
  
  Index: SMTPAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/SMTPAppender.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- SMTPAppender.java 2001/05/21 18:35:42     1.24
  +++ SMTPAppender.java 2001/07/25 19:43:44     1.25
  @@ -56,94 +56,6 @@
     protected CyclicBuffer cb = new CyclicBuffer(bufferSize);
     protected Message msg;
   
  -
  -
  - /**
  -     A string constant used in naming the <em>To</em> field of
  -     outgoing e-mail output file. Current value of this string
  -     constant is <b>To</b>.
  -
  -     <p>Note that all option keys are case sensitive.
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm. 
  -     This constant will be removed in the <em>near</em> term.
  -  */
  -  public static final String TO_OPTION = "To";
  -
  - /**
  -     A string constant used in naming the <em>From</em> field of
  -     outgoing e-mail output file. Current value of this string
  -     constant is <b>From</b>.
  -
  -     <p>Note that all option keys are case sensitive.
  -
  -     @deprecated Options are now handled using the JavaBeans paradigm. 
  -     This constant will be removed in the <em>near</em> term.     
  -  */
  -  public static final String FROM_OPTION = "From";
  -
  - /**
  -     A string constant used in naming the <em>Subject</em> field of
  -     outgoing e-mail output file. Current value of this string
  -     constant is <b>Subject</b>.
  -
  -     <p>Note that all option keys are case sensitive.
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm. 
  -     This constant will be removed in the <em>near</em> term.
  -  */
  -  public static final String SUBJECT_OPTION = "Subject";
  -
  -
  - /**
  -     A string constant used in naming the SMTP host that will be
  -     contacted to send the e-mail. Current value of this string
  -     constant is <b>SMTPHost</b>.
  -
  -     <p>Note that all option keys are case sensitive.
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm. 
  -     This constant will be removed in the <em>near</em> term.
  -  */
  -  public static final String SMTP_HOST_OPTION = "SMTPHost";
  -
  - /**
  -     A string constant used in naming the cyclic buffer size option.
  -     Current value of this string constant is <b>BufferSize</b>.
  -
  -     <p>Note that all option keys are case sensitive.
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm. 
  -     This constant will be removed in the <em>near</em> term.
  -  */
  -  public static final String BUFFER_SIZE_OPTION = "BufferSize";
  -
  -
  - /**
  -     A string constant used in naming the class of the
  -     TriggeringEventEvaluator that this SMTPApepdner wll use. Current
  -     value of this string constant is <b>EvaluatorClass</b>.
  -
  -     <p>Note that all option keys are case sensitive.
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm. 
  -     This constant will be removed in the <em>near</em> term.
  -  */
  -  public static final String EVALUATOR_CLASS_OPTION = "EvaluatorClass";
  -
  -
  -  /**
  -     A string constant used in naming the option for setting the the
  -     location information flag.  Current value of this string
  -     constant is <b>LocationInfo</b>.  
  -
  -     <p>Note that all option keys are case sensitive.
  -
  -     @deprecated Options are now handled using the JavaBeans paradigm. 
  -     This constant will be removed in the <em>near</em> term.
  -  */
  -  public static final String LOCATION_INFO_OPTION = "LocationInfo";
  -  
     protected TriggeringEventEvaluator evaluator;
   
   
  @@ -166,22 +78,6 @@
       this.evaluator = evaluator;
     }
   
  - /**
  -     Retuns the option names for this component in addition in
  -     addition to the options of its super class {@link
  -     AppenderSkeleton}.
  -     
  -     @deprecated We now use JavaBeans introspection to configure
  -     components. Options strings are no longer needed.
  -  */
  -  public
  -  String[] getOptionStrings() {
  -    return OptionConverter.concatanateArrays(super.getOptionStrings(),
  -          new String[] {TO_OPTION, FROM_OPTION, SUBJECT_OPTION, 
  -                       SMTP_HOST_OPTION, BUFFER_SIZE_OPTION,  
  -                       EVALUATOR_CLASS_OPTION, LOCATION_INFO_OPTION });
  -  }
  -  
   
     /**
        Activate the specified options, such as the smtp host, the
  @@ -374,37 +270,7 @@
     String getSubject() {
       return subject;
     }
  -
  -
  -/**
  -   @deprecated Use the setter method for the option directly, instead
  -   of the generic <code>setOption</code> method.  */
  -  public
  -  void setOption(String option, String value) {
  -    if(value == null) return;
  -    super.setOption(option, value);    
  -
  -    if(option.equals(TO_OPTION)) 
  -      to = value;
  -    else if (option.equals(FROM_OPTION))
  -      from = value;
  -    else if (option.equals(SMTP_HOST_OPTION)) 
  -      smtpHost = value;
  -    else if (option.equals(SUBJECT_OPTION)) 
  -      subject = value;
  -    else if (option.equals(EVALUATOR_CLASS_OPTION)) {      
  -      evaluator = (TriggeringEventEvaluator) 
  -                OptionConverter.instantiateByClassName(value, 
  -                                           TriggeringEventEvaluator.class,
  -                                                       evaluator);    
  -    } else if (option.equals(BUFFER_SIZE_OPTION)) {
  -      bufferSize = OptionConverter.toInt(value, bufferSize);    
  -      cb.resize(bufferSize);
  -    } else if (option.equals(LOCATION_INFO_OPTION))
  -      locationInfo = OptionConverter.toBoolean(value, locationInfo);
  -  }
  -
  -
  +  
     /**
        The <b>From</b> option takes a string value which should be a
        e-mail address of the sender.
  
  
  
  1.9       +0 -94     jakarta-log4j/src/java/org/apache/log4j/net/SocketAppender.java
  
  Index: SocketAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/SocketAppender.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SocketAppender.java       2001/04/03 16:37:25     1.8
  +++ SocketAppender.java       2001/07/25 19:43:44     1.9
  @@ -96,61 +96,6 @@
       @since 0.8.4 */
   
   public class SocketAppender extends AppenderSkeleton {
  -  /**
  -     A string constant used in naming the option for setting the the
  -     host name of the remote server.  Current value of this string
  -     constant is <b>RemoteHost</b>. See the {@link #setOption} method
  -     for the meaning of this option.
  -
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -  */
  -  public static final String REMOTE_HOST_OPTION = "RemoteHost";
  -
  - /**
  -     A string constant used in naming the option for setting the the
  -     port to contect on the remote server.  Current value of this string
  -     constant is <b>Port</b>.  See the {@link #setOption} method
  -     for the meaning of this option.
  -
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -  */
  -  public static final String PORT_OPTION = "Port";
  -
  -  /**
  -     A string constant used in naming the option for setting the the
  -     location information flag.  Current value of this string
  -     constant is <b>LocationInfo</b>.  See the {@link #setOption} method
  -     for the meaning of this option.
  -
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -  */
  -  public static final String LOCATION_INFO_OPTION = "LocationInfo";
  -
  -  /**
  -     A string constant used in naming the option for setting the delay
  -     between each reconneciton attempt to remote server.  Current
  -     value a of this string constant is <b>ReconnectionDelay</b>.  See
  -     the {@link #setOption} method for the meaning of this option.
  -
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -  */
  -  public static final String RECONNECTION_DELAY_OPTION = "ReconnectionDelay";
   
     /**
        The default port number of remote logging server (4560).
  @@ -206,45 +151,6 @@
       this.address = getAddressByName(host);
       this.remoteHost = host;
       connect(address, port);
  -  }
  -  
  -  /**
  -     Retuns the option names for this component, namely the string
  -     array consisting of {{@link #REMOTE_HOST_OPTION}, {@link
  -     #PORT_OPTION}, {@link #LOCATION_INFO_OPTION}, {@link
  -     #RECONNECTION_DELAY_OPTION}} in addition to the options of its
  -     super class {@link AppenderSkeleton}.
  -
  -     @deprecated We now use JavaBeans introspection to configure
  -     components. Options strings are no longer needed.
  -    */
  -  public
  -  String[] getOptionStrings() {
  -    return OptionConverter.concatanateArrays(super.getOptionStrings(),
  -                          new String[] {REMOTE_HOST_OPTION, PORT_OPTION, 
  -                                     LOCATION_INFO_OPTION,
  -                                     RECONNECTION_DELAY_OPTION});
  -  }
  -
  -  /**
  -     @deprecated Use the setter method for the option directly instead
  -     of the generic <code>setOption</code> method.
  -   */
  -  public
  -  void setOption(String option, String value) {
  -    if(value == null) return;
  -    super.setOption(option, value);    
  -
  -    if(option.equals(REMOTE_HOST_OPTION)) {
  -      address = getAddressByName(value);
  -      remoteHost = value;
  -    } else if (option.equals(PORT_OPTION)) {
  -      port = OptionConverter.toInt(value, port);
  -    } else if (option.equals(LOCATION_INFO_OPTION)) {
  -      locationInfo = OptionConverter.toBoolean(value, locationInfo);    
  -    } else if (option.equals(RECONNECTION_DELAY_OPTION)) {
  -      reconnectionDelay = OptionConverter.toInt(value, reconnectionDelay);  
  -    }
     }
     
     /**
  
  
  
  1.12      +0 -74     jakarta-log4j/src/java/org/apache/log4j/net/SyslogAppender.java
  
  Index: SyslogAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/SyslogAppender.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SyslogAppender.java       2001/04/17 22:32:35     1.11
  +++ SyslogAppender.java       2001/07/25 19:43:44     1.12
  @@ -80,43 +80,6 @@
     /** reserved for local use*/
     final static public int LOG_LOCAL7 = 23<<3; 
   
  -   /**
  -     A string constant used in naming the option for setting the
  -     syslog server.  Current value of this string constant is
  -     <b>SyslogHost</b>.
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -     @since 0.8.1 */
  -  public static final String SYSLOG_HOST_OPTION = "SyslogHost";
  -
  -   /**
  -     A string constant used in naming the option for setting facility
  -     type.  Current value of this string constant is <b>Facility</b>.
  -
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -     @since 0.8.1 */
  -  public static final String FACILITY_OPTION = "Facility";  
  -
  -   /**
  -     A string constant used in naming the option for setting whether
  -     the facility name is printed or not.  Current value of this
  -     string constant is <b>FacilityPrinting</b>.
  -
  -     
  -     @deprecated Options are now handled using the JavaBeans paradigm.
  -     This constant is not longer needed and will be removed in the
  -     <em>near</em> term.
  -
  -     @since 0.8.1 */
  -  public static final String FACILITY_PRINTING_OPTION = "FacilityPrinting";  
  -
     protected static final int SYSLOG_HOST_OI = 0;
     protected static final int FACILITY_OI = 1;
     
  @@ -148,43 +111,6 @@
       this(layout, syslogFacility);
       setSyslogHost(syslogHost);
     }
  -
  -  /**
  -     Returns the option names for this component, namely the string
  -     array consisting of {{@link #SYSLOG_HOST_OPTION}, {@link
  -     #FACILITY_OPTION}, {@link #FACILITY_PRINTING_OPTION}}.
  -
  -     @deprecated We now use JavaBeans introspection to configure
  -     components. Options strings are no longer needed.
  -
  -     @since 0.8.1 */
  -  public
  -  String[] getOptionStrings() {
  -    return OptionConverter.concatanateArrays(super.getOptionStrings(),
  -                   new String[] {SYSLOG_HOST_OPTION, FACILITY_OPTION,
  -                                 FACILITY_PRINTING_OPTION});
  -  }
  -  
  -  /**
  -     @deprecated Use the setter method for the option directly instead
  -     of the generic <code>setOption</code> method. 
  -
  -   */
  -  public
  -  void setOption(String option, String value) {
  -    if(value == null) return;
  -    
  -    super.setOption(option, value);    
  -    
  -    if(option.equals(SYSLOG_HOST_OPTION)) 
  -      this.setSyslogHost(value);
  -    else if(option.equals(FACILITY_PRINTING_OPTION))
  -      facilityPrinting = OptionConverter.toBoolean(value, facilityPrinting);
  -    else if(option.equals(FACILITY_OPTION)) {
  -      this.setFacility(value);
  -    }
  -  }
  -  
   
     /**
        Release any resources held by this SyslogAppender.
  
  
  
  1.15      +1 -0      jakarta-log4j/src/java/org/apache/log4j/test/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/Makefile,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Makefile  2001/06/26 18:28:57     1.14
  +++ Makefile  2001/07/25 19:43:44     1.15
  @@ -28,6 +28,7 @@
    PrintProperties.java\
    CustomCategoryTest.java\
    FQCNTest.java\
  + DRFATest.java\
   
   ifdef $(ISJDK1)
     JSOURCES:=$(JSOURCES)  UnitTestOR.java
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to