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]

Reply via email to