Use the CompositeRollingFileAppender, and set its 'RollingStyle' value to 3.
all the best,
Rami
-----Original Message-----
From: Bansemir, Carsten [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 2:22 PM
To: Log4J Users List
Subject: AW: Problems with multiple Threads on DailyRollingFileAppender
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]
NOTICE: This communication contains information which may be proprietary,
privileged or confidential. If you are not the intended recipient (or
authorized to receive for the intended recipient), or believe that you have
received this communication in error, please do not print, copy, retransmit,
disseminate, disclose or otherwise use the information. Also, please
indicate to the sender that you have received this communication in error
and delete the copy you received. Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]