Nicko,
Thanks for the response. I had dug through the
ComputeCheckPeriod and NextCheckDate methods and was scratching my head
looking at the patterns available in
System.Globalization.DateTimeFormatInfo. I thought there was something I
missed.
I guess I'll put my weekly logging aspirations on hold until the
"week of year" pattern becomes available. Time to track down the .NET
feature request form...
Keep up the great work!
- josh jacob :)
-----Original Message-----
From: Nicko Cadell [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 12:53 PM
To: 'Log4NET User'
Subject: RE: RollingFileAppender - How does one specify TopOfWeek
RollPoint with a datepattern?
Josh,
I was wondering when someone would ask that.
This functionality is based on the log4j implementation. The
RollingFileAppender uses a very 'clever' system to detect the resolution
of the DatePattern specified. It does this in the ComputeCheckPeriod
method.
The problem is that it uses the DateTime.ToString() to render the
pattern to a string. Therefore the only valid patterns are those
supported by the DateTime class. If the DateTime class had a pattern
that was the week number then you could specify that and
ComputeCheckPeriod would pick TopOfWeek.
Unless there is a 'week' pattern that I don't know about it is not
possible to specify weekly rolling at the moment.
Nicko