Hi Remy!
Cool bugfix, but you forgot to backport a piece of it: @@ -604,11 +612,14 @@ // If the date has changed, switch log files if (!dateStamp.equals(tsDate)) { synchronized (this) { - close(); - dateStamp = tsDate; - open(); + if (!dateStamp.equals(tsDate)) { + close(); + dateStamp = tsDate; + open(); + } } } + } // Log this message Since the bug was likely originally my fault, I felt compelled to report to you about this missing hunk. :) Keep up the excellent work! -- Jason Brittain <jasonb(at)collab(dot)net> CollabNet http://www.collab.net [EMAIL PROTECTED] wrote: > remm 01/10/23 16:08:10 > > Modified: catalina/src/share/org/apache/catalina/valves Tag: > tomcat_40_branch AccessLogValve.java > Log: > - Port fix for 4327. > > Revision Changes Path > No revision > > > No revision > > > 1.10.2.1 +10 -2 >jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java > > Index: AccessLogValve.java > =================================================================== > RCS file: >/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java,v > retrieving revision 1.10 > retrieving revision 1.10.2.1 > diff -u -r1.10 -r1.10.2.1 > --- AccessLogValve.java 2001/08/27 19:10:26 1.10 > +++ AccessLogValve.java 2001/10/23 23:08:10 1.10.2.1 > @@ -128,7 +128,7 @@ > * > * @author Craig R. McClanahan > * @author Jason Brittain > - * @version $Revision: 1.10 $ $Date: 2001/08/27 19:10:26 $ > + * @version $Revision: 1.10.2.1 $ $Date: 2001/10/23 23:08:10 $ > */ > > public final class AccessLogValve > @@ -300,6 +300,12 @@ > private boolean resolveHosts = false; > > > + /** > + * Instant when the log daily rotation was last checked. > + */ > + private long rotationLastChecked = 0L; > + > + > // ------------------------------------------------------------- Properties > > > @@ -594,9 +600,11 @@ > > // Only do a logfile switch check once a second, max. > long systime = System.currentTimeMillis(); > - if ((systime - currentDate.getTime()) > 1000) { > + if ((systime - rotationLastChecked) > 1000) { > + > // We need a new currentDate > currentDate = new Date(systime); > + rotationLastChecked = systime; > > // Check for a change of date > String tsDate = dateFormatter.format(currentDate); > > > >