i guess the easiest solution is to subclass RollingFileAppender (or 
DailyRollingFileAppender) and override rollOver() to write something into the 
new file after calling super.rollOver()

be aware that if you want to do this with DailyRollingFileAppender you have to 
put your class into the package org.apache.log4j (package visability)
for RollingFileAppender you can stay in your own packages (public visability)

[IMHO it would make sense for both methods to have protected visability]

cheers
patrick

> -----Ursprüngliche Nachricht-----
> Von: Rakesh Ayilliath [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 5. Februar 2007 08:22
> An: [email protected]
> Betreff: RollingFileAppender help
> 
> 
> Hi,
> 
> I'd like to add a certain set of logging statements (eg: 
> version number, 
> build number) of the application to the log, everyday when the log 
> rolls. This would help the support folks in identifying the 
> version of 
> app which was used by the customer.
> I couldnt find a way to trigger a log entry when the 
> RollingFileAppender 
> rolls at the start of every day. Is there anyway I can do this?
> 
> Thanks
> Rakesh Ayilliath
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 



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

Reply via email to