You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Kailash KN <ka...@thbs.com> on 2006/05/26 07:23:14 UTC

Change in the RollOverFormat of logs???

Hi,

I want my log files to be rolled over, i'm using a RollingFileAppender for the same purpose. My question is log4j, by default, rolls over the file with the extension filename.log.1, filename.log.2....

But i want it in the format of filename_01.log, filename_02.log, .... I'm overriding the rollOver() method in my class, but its still calling RollingFileAppender's method, then i realized ill have to change it in the subAppend(LoggingEvent event) method, but my question is where do i invoke this method in my code.

Any help would be greatly appreciated. 

Thanks in advance.

Thanks & Regards,
Kailash.K.N.