Howdy,
activateOptions is called without any logging events, on startup,
without any logging events.


Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Stefan Hellwig [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, September 10, 2003 9:24 AM
>To: Log4J Users List; Shapira, Yoav
>Subject: Re: Can I create empty log files (without logging events)?
>
>Hi,
>
>Thanks for your reply!
>
>On Wednesday 10 September 2003 15:10, Shapira, Yoav wrote:
>> It's not a stupid question, but (without knowing better) it seems
like a
>> stupid requirement.
>
>Yes, indeed. That's what I was trying to tell our customer as well but
he
>didn't listen, and since the customer is always right...
>
>> Since you're already using a custom appender, why not modify it to
>> "touch" i.e. create the log file in its activateOptions method?
>
>Yes, that's an idea. However, I'm not sure when this method will be
called.
>If
>it is just called when a LoggingEvent is triggered I can't use it
because
>there will be none.
>
>> Better yet, add a configurable option to create an empty file.
>
>I'll have to do that anyhow because in a few days the customer will
>certainly
>realize that this was a stupid requirement and he'll want to get rid of
it
>again...
>
>> It may be more of a java.io issue then (maybe open the file, write an
>empty
>> string to it, flush the writer?).
>
>Yes, something like that but - like I said - I'm not sure if the
>DailyRollingFileAppender (and derived classes) will be able to do
anything
>without a LoggingEvent triggering them first. I would need to know if
>there's
>a method that will be called every time a roll-over of the file happens
(or
>"might" happen), even without a LoggingEvent.
>
>Otherwise I would have to trigger an "empty" LoggingEvent every two
minutes
>from within my application...
>
>Regards, Stefan.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to