I found a solution: DailyRollingFileAppenderExt does exactly what I want, but now I 
have another Problem:

I want to roll over the logfile also when it becomes to large, but only the 
RollingFileAppender can do this. I then found an Appender called 
CompositeRollingFileAppender, but then I get the old problem back (because 
CompositeRollingFileAppender uses the default behaviour of DailyRollingFileAppender). 
So can anyone tell me how I (easily) can add the functionality of RollingFileAppender 
to the DailyRollingFileAppenderExt ?

(I know there will be strategy based rollovers in the future (do you know when?) , but 
i need this functionality now)

-----Urspr�ngliche Nachricht-----
Von: Bansemir, Carsten 
Gesendet: Mittwoch, 3. September 2003 10:18
An: [EMAIL PROTECTED]
Betreff: Problems with multiple Threads on DailyRollingFileAppender


Hi, I have to log from multiple Threads of a big Application, and I want to use the 
DailyRollingFileAppender to daily log to a new file. My Problem is that some Threads 
log to the old files (yesterday logfile) instead of the new ones. I'm using a 
LogFileRoller wich guarantees that the logfile rolls at midnight (a Cron Job wich logs 
to every Logfile once at midnight). I searched the mailing list, and found out that 
there are Problems with the DailyRollingFileAppender when there are Threads wich block 
the files, so that the System isn't able to rename the files (especially under Windows 
OS). The Suggestion was to stop and re-run the application, but that won't work here, 
because our Application is running in production, and it's not possible to stop the 
application.

Has anybody therefor wrote an own Version of DailyRollingFileAppender that doesn't 
uses the critical (at least on Windows Systems) Java Methods (File.renameTo()) or 
which does the RollOver on a completely different way ?  

I am using log4j 1.2.5 with the SUN jdk1.2.2 of Visual Age for Java or jdk1.3.1_08 
under WSAD.
Running OS: Windows NT4
 


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

Reply via email to