is there a solution to make the log files be created each week by RollingFileAppender's datePattern? I know that yyyyMMdd is valid for each day but i couldn't find a solution for weekly logging. thanks in advance.
A:
As far as I can tell you need to write your own appender for this. The .Net custom format strings do not have anything for getting the calendar week. There is an API for that though:
http://msdn.microsoft.com/en-us/library/system.globalization.calendar.getweekofyear%28VS.71%29.aspx
Stefan Egli
2010-08-02 11:59:24
i read in here http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo%28VS.71%29.aspx that there was a formating like ddd which returns the week day. so i wrote yyyyMMddd and now i am waiting for the next week to see if it worked fortunately =)
cemregoksu
2010-08-03 12:54:48
this returns something like "Mon" for "Monday", doesn't it?
Stefan Egli
2010-08-03 13:22:40
Yes, it does i think... so it supposes the idea that it won't work? =)
cemregoksu
2010-08-04 08:07:06
It will not work. You need to extend the appender or write your own.
Stefan Egli
2010-08-04 08:46:33