views:

50

answers:

1

I am using log4net to generate logs in my applicaiton. My requirement was to generate logs every minute. I have achieved this using RollingMode.Date. These files are named like: name.log.yyyyMMdd-HHmm. But my requirement is to generate the files with name like: name.log.n where n will be sequential number. Any help??

+1  A: 

I looked at the source code of RollingFileAppender and it seems that CountDirection=1 might be want you want.
If this does not work, I guess you need to write your own appender inheriting from RollingFileAppender which implements its own RollOverRenameFiles.

weismat
I did exaclty that. Got the source code and edited the code so as to get the name of the output file in the desired format. Thanks for your help. :)
MockedMan.Object