Is whole days go by without a single log been generated, then why do you need to rotate log files?

To answer your question, there is no NOP operation. However, you could modify DailyRollingFileAppender to roll on demand. There is such an appender. It is org.apache.log4j.varia.ExternallyRolledFileAppender


At 11:43 24.01.2003 +0000, you wrote:
Hi there,

I developed a service which uses the DailyRollingFileAppender class logger. It works fine but it has a behaviour that I need to overcome.

Note: The logging system is being made on a daily basis.

I will give you an example to explain my problem:


* On the 22 January 2003 the service generated the logs to the accessGW.log file.

* On the 23 January 2003 there was no accesses to the service.

* Today, 24 January 2003, there was still no accesses to the service and therefore the accessGW.log.2003-01-23 was not created.


I was thinking on creating a new thread on the service for calling the logger (of course, i don't want to generate a fake log information, I would need a kind of NOP) in order to the accessGW.log.2003-01-23 be created. Which log4j method should I use ?

Is there any other idea to overcome this ?

BTW, if there is no accesses then i would like that log4j creates a log file for that day with length zero.

Thanks in advance.

Best regards,
Nuno Carvalho


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

--
Ceki


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

Reply via email to