The DatePattern
string needs to be something that the SimpleDateFormatter
will accept.
Unfortunately this means that, out of the box, this doesn't include being able to set the boundary to be a week number. There are ways of getting this value in C#, but it's not obvious that we can extend the SimpleDateFormatter
or provide a different implementation of IDateFormatter
and use that instead (or even in a custom RollingFileAppender
).
So how might we get a Log4Net RollingFileAppender
to roll weekly?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…