At 12:16 19.07.2001 +0200, David Muelas Sánchez wrote:
>        finally, I have done it.
>
>        I´m adding new appenders each time I have to create a new file and removing
>them after I´ve wrote what I need.
>
>
>        Thanks very much for your help Sam.

David,

Out of curiosity, have you considered using the RollingFileAppender with 
a maxBackupIndex of 0 or 1? Ceki


>-----Mensaje original-----
>De: Sam Newman [mailto:[EMAIL PROTECTED]]
>Enviado el: jueves, 19 de julio de 2001 12:06
>Para: LOG4J Users Mailing List
>Asunto: Re: Problems to clear the log file at runtime
>
>
>ok - what I would suggest is to clear the file is that you:
>1.) Disable the file appender
>2.) Delete/move the file
>3.) Renable the file appender
>
>You may of course potentially loose some logging info using this method if
>your application is multi-threaded.
>
>sam
>----- Original Message -----
>From: "David Muelas Sánchez" <[EMAIL PROTECTED]>
>To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Thursday, July 19, 2001 10:55 AM
>Subject: RE: Problems to clear the log file at runtime
>
>
>>
>>
>> In a few words, what I want to do is to clear the file during the
>> execution. I can´t use another file for the appender because it has to be
>> the same file but cleared.
>>
>>




--
Ceki Gülcü - http://qos.ch


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

Reply via email to