>What you are suggesting is completely different from the current
>semantics.
>Until this email, I understood your example to be equivalent to a
>composite roll in the current implementation. In a composite roll, two
>different types of rolling take place. One on the date/time boundary
>and one on the size boundary. Resulting in
>File.datetime1.1
>File.datetime1.2
>File.datetime2.1
>File.datetime2.2
>
>I think that preserving this type of roll is important. Currently we
>have Date, Size and Composite rolling. If I have understood what you
>are suggesting, you are suggesting the addition of a 4th roll type
>called "ConditionRollingXX" that would have the semantic of AND or OR of
>the two (hopefully only two) conditions. XX would be the AND or OR for
>the type of condition. If there are more than two conditions, what are
>they?
Maybe something like "Date", "Size", "ApplicationUptime", "RPCTrigger", .. ?
>Did I understand correctly and is this needed?
I believe that I have to explain this further. My idea is to split the
rolling into two parts:
* rolling condition
* file naming strategy
This should ideally deprecate the different rolling strategies and their
hideous behaviour by replacing it with a clear API and a configuration
semantic. This here:
<rollFileConfiguration>
<rollFileCondition when="daily" />
<rollFileNamingStrategy value="Date" />
</rollFileConfiguration>
or this here (which is semantically the same, and would be just another
implementation of the "condition" interface):
<rollFileConfiguration>
<rollFileCondition month="*" day="*" hour="24" minute="*" />
<rollFileNamingStrategy value="Date" />
</rollFileConfiguration>
Is much clearer than the old-fashioned thing:
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
<file value="logfile" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger
[%property{NDC}] - %message%newline" />
</layout>
</appender>