Hi, attached is a simple version of a HierarchicalRotateStrategy (also the name might not be perfect). It can be initialized with an array of RotateStrategy objects. If the isRotationNeeded() method is needed this array is queried until all objects are processed or the first one responds with true. Carsten Open Source Group sunShine - b:Integrated ================================================================ Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn www.sundn.de mailto: [EMAIL PROTECTED] ================================================================ > -----Ursprungliche Nachricht----- > Von: giacomo [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 17. August 2001 19:51 > An: Avalon Development > Betreff: Re: AW: LogKit - FileRotation > > > On Fri, 17 Aug 2001, Peter Donald wrote: > > > On Fri, 17 Aug 2001 18:58, Carsten Ziegeler wrote: > > > I just looked at the new RotatingFileOutputLogTarget. > > > > > > I think there are some required features missing: > > > 1. a setRotateStrategy() method > > > 2. a setFilenameStrategy() method > > > > I was thinking of getting rid of all those methods and passing in the > > strategys via the constructor. What do you think of that? > > +1 for constructor approach, it would ease the LogTargetFactories I'm > writing for the LogKitManagement as well as being consistent to the > other LogTarget IIRC. > > > > 3. a RotateStrategy which can combine more than one strategy. > We here use > > > in the first run the RotateStrategyByTime, however if > during a period > > > of time the log gets to big (RotateStrategyBySize) we rotate. So > > > you have a hierarchical rotate strategy. > > > > I like. > > How to realize? Passing a array of strategies? > > > > If you also think that these features are valuable, I can > implement them > > > and contribute it. > > > > go for it ;) > > +1 :) > > Giacomo > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
HierarchicalRotateStrategy.zip
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
