logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: New RollingFileAppender semantics
Date Mon, 19 Sep 2011 15:12:13 GMT
On 2011-09-18, Roy Chastain wrote:

> After having spent two weekends looking at and playing with the code, I
> have decided that I do not have clear understanding of my target.

Poor you.

> Given that it appears that I am going to break the internal contract for
> RFA and the ambiguity in the current implementation it appears that we
> should create a new RFA.  (Perhaps called RollingFileAppender2??) with a
> clear definition of its semantics.

+1 - I don't like the "2" suffix so we may want to search for a better name.

> As such I would like to propose
> 1) - Make CountDirection default to positive

> 2) - Make PreserveLogFileNameExtension default to true

> 3) - Any date portion in a file name be prefixed with a . as if it were
> an extension.

+1

> 3) - Decide if PreserveLogFileNameExtension applies to both the
> datePattern and the size roll index or just to the size roll index.  I
> propose that it applies to size roll index and a new parameter
> (PreserveLogFileBase - defaults to true) be used to apply to the date
> roll.

[Oh, another item 3.  Probably used RFA to number them ;-)]

I like your proposal.

> 4) <snip/>  In other words, only
> allow date editing within the datePattern.  The following config would
> achieve almost same file names.
> <file value="./output/LoggerTest.log"/>
> <datePattern value="yyyyMMddHHmm"/>
> <PreserveLogFileBase value="true"/>
> Generated file name would look like LogTest.201109181715.log
> If roll type become composite, then the files would look like
> LogTest.201109181715.1.log, LogTest.201109181715.2.log

+1 for everything that makes things more predictable.

> 5) - I propose that in the case of a maximum fixed size of roll backups,
> that the roll index become a fixed width field with leading zeros.

> 6) - Include a new MaxDateRollBackups parameter to limit the number of
> date periods that will be 

+1

> 7) - Personally I would feel no loss if StaticFileName went away and was
> always treated as false, but I expect that many people would want to
> keep it.

I know the Ops folks of one of my team's bigger deployments would want
it.

Stefan

Mime
View raw message