logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Creating the rotated log files even if there is no accesses
Date Fri, 24 Jan 2003 12:02:37 GMT


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:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>
>

--
Ceki



--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message