>>>> Grouping the properties that affect the rolling strategy and separating >>>> them from the others makes sense to me. >> >>> It may be even a nice to implement it like that. This opens ways to >>> something like this: >> >>> <rollFileConfiguration> >>> <rollFileAndCondition> >>> <rollFileCondition size="5MB" /> >>> <rollFileCondition when="daily" /> >>> </rollFileAndCondition> >>> </rollFileConfiguration> >> >>You realize you are going down the road of boolean combinators here, >>aren't you? Do we roll the file if one of the conditions is met, or all >>of them? > >Depends on the conjunction used (And vs Or). In my example, the roll file >should be done daily and only if the file is not bigger than 5MB. I.e. the >algorithms are easy:
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? Did I understand correctly and is this needed? > ># and conjuntion >foreach condition in conditions: > if not condition.isMet(file): > return false >return true > ># or conjuction >foreach condition in conditions: > if condition.isMet(file): > return true >return false > >>> But I don't know if that really fits into the "log4net is a clone of >>> log4j" philosophy. :-) >> >>No problem here as we are not touching the architecture only one of the >>appenders - and a lot of variance is allowed here. I realize you >>haven't been serious. > >Not too serious, but most ideas start off being hilarious. *laughing* >Anyway, for now it's just an idea. Please discuss. :-)
