You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-cvs@jakarta.apache.org by ce...@apache.org on 2001/03/05 00:57:20 UTC

cvs commit: jakarta-log4j/org/apache/log4j DailyRollingFileAppender.java

ceki        01/03/04 15:57:20

  Modified:    docs     HISTORY download.html
               org/apache/log4j DailyRollingFileAppender.java
  Log:
  Corrected hugely silly bug in DailyRollingFileAppender.java (it was missing it's main working method).
  
  Small changes to download and HISTORY files.
  
  Revision  Changes    Path
  1.25      +9 -1      jakarta-log4j/docs/HISTORY
  
  Index: HISTORY
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/HISTORY,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- HISTORY	2001/02/23 21:43:46	1.24
  +++ HISTORY	2001/03/04 23:57:18	1.25
  @@ -50,7 +50,7 @@
    - The structure of the distribution changed somewhat. The log4j.jar
      files can be found under dist/. The javadoc directory has been
      moved to docs/api/. We are now totally dependent on ANT to perform
  -   all the steps involved in creating a release, in including
  +   all the steps involved in creating a release, including
      compilation, jar file creation, generation of the javadocs, and for
      the creation of the distribution tar and zip files. [*]
   
  @@ -71,6 +71,14 @@
    - Improved the search method for finding the "log4j.properties" file in
      the static initializer of Category class. Thanks to Calvin Chan for
      supplying a better method. [*]
  +
  + - The code handling the FCQN (formerly instanceFQN) parameter was
  +   cleaned up. There is now a well-established and simple manner for
  +   sub-classes of Category (or wrapper classes) to define the FCQN
  +   variable: just define a static variable, say FCQN, consisting of
  +   the fully qualified class name of the subclass or wrapper, supply
  +   this variable as an argument to forcedLog method if and when
  +   the sub-class or wrapper invokes that method. [*]
   
    - Made the instanceFCQN an instance variable instead of a class
      static in Category.java. In related move, the Category constructor
  
  
  
  1.15      +3 -9      jakarta-log4j/docs/download.html
  
  Index: download.html
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/download.html,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- download.html	2001/02/23 22:17:54	1.14
  +++ download.html	2001/03/04 23:57:18	1.15
  @@ -148,31 +148,25 @@
           <blockquote>
                                       <dl>
     <dt><a href="http://log4p.sourceforge.net"><b>log4p</b></a></dt>
  -
     <dd>A Python translation of log4j by Igor Poteryaev.</dd>
   
   
     <dt><a href="http://www.japhy.de/configLog4j"><b>configLog4j</b></a></dt>
  -
     <dd>A visual log4j configuration file editor by Tobias Dezulian.</dd>
   
   
     <dt><a href="http://log4cpp.sourceforge.net"><b>log4cpp</b></a></dt>
  -
     <dd>A C++ translation of log4j by Bastiaan Bakker.</dd>
   
     <dt><a href="http://developer.jini.org/exchange/projects/log"><b>JINI logging service</b></a></dt>
  -
     <dd>A log4j wrapper for JINI Jerome Bernard.</dd>
   
   
     <dt><a href="http://support.klopotek.de/log4j/jdbc/index.html"><b>JDBCAppender</b></a></dt>
  -
  -  <dd>A JDBCAppender by <a href="mailto:t.fenner@klopotek.de">Thomas
  -  Fenner</a>.</dd>
  -
  -
  +  <dd>A JDBCAppender by <a href="mailto:t.fenner@klopotek.de">Thomas Fenner</a>.</dd>
   
  +  <dt><a href="http://www.epesh.com/logtags.jsp"><b>The Log Tag Library</b></a></dt>
  +  <dd>A tag library designed to give JSP tag-level access to log4j.</dd>
   </dl>
                                                   <p>If you would like your software to be listed here, then send a note
   to the <a href="mailto:log4j-user@jakarta.apache.org">log4j-user@jakarta.apache.org</a>
  
  
  
  1.8       +20 -0     jakarta-log4j/org/apache/log4j/DailyRollingFileAppender.java
  
  Index: DailyRollingFileAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/DailyRollingFileAppender.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DailyRollingFileAppender.java	2001/02/28 20:50:33	1.7
  +++ DailyRollingFileAppender.java	2001/03/04 23:57:20	1.8
  @@ -331,6 +331,26 @@
         datePattern = value;
       }
     }
  +  
  +  /**
  +     This method differentiates DailyRollingFileAppender from its
  +     super class.
  +  */
  +  protected 
  +  void subAppend(LoggingEvent event) {
  +    long n = System.currentTimeMillis();
  +    if (n >= nextCheck) {
  +      now.setTime(n);
  +      nextCheck = rc.getNextCheckMillis(now);
  +      try {  
  +	rollOver();  
  +      }
  +      catch(IOException ioe) {
  +	LogLog.error("rollOver() failed.", ioe);
  +      }
  +    }
  +    super.subAppend(event);
  +   }
   }  
   
   /**