> 
> > The rollover failure is real though. (Fortunately it will not cause 
> > data loss as was the case in previous versions of log4j.)
> Something is
> > preventing the file from being renamed
> >
[cut]
> > DEBUG[Thread-1]: org.apache.log4j.rolling.helper.Util 11594  - 
> > Renaming file 
> > [D:\Java\Apache\Jakarta\jakarta-tomcat-5.5.4/logs/localhost.log]
> > toFile
> > [D:\Java\Apache\Jakarta\jakarta-tomcat-5.5.4/logs/localhost.log.1]

I noticed you're using Windows. Would you by any chance happen to be
viewing/tailing the log file when it's being renamed? There's a problem in
Windows when a program (e.g., Chainsaw) happens to have the file open at the
instant when the RollingFileAppender tries to rename the file.  Windows
produces an error about the file being in use by another process at this
point.  The solution is for the reading program to open the file with
FILE_SHARE_DELETE specified. Unfortunately, this doesn't appear to be
accessible from Java. (For that matter, Microsoft doesn't describe
FILE_SHARE_DELETE as an option in much of the MSDN documentation).

There's also a possibility this is behind the "RE: RollingFileAppender
issue" currently being discussed in log4j-user.

Mike Blake-Knox
email: [EMAIL PROTECTED]
TSYS Office: (706) 644-3643
cellphone: (706) 570-4641
 

> -----Original Message-----
> From: Jacob Kjome [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 02, 2004 5:06 PM
> To: Log4J Developers List
> Subject: Re: Joran, RollingFileAppender, and Rollover failure warnings
> 
> > The rollover failure is real though. (Fortunately it will not cause 
> > data loss as was the case in previous versions of log4j.)
> Something is
> > preventing the file from being renamed
> >



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

Reply via email to