[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-user
Subject:    RE: Max backup index and daily rolling
From:       "Steve Pruitt" <SPruitt () exstream ! com>
Date:       2005-11-17 21:34:49
Message-ID: 2F8048C5DB63E6498D846B0D08AF6867282EB1 () LexMSX01 ! exstream ! com
[Download RAW message or body]

Ah. Thanks for the explanation.  I understand the problem better now.
Hey, bottom line... I am tickled to have a logging framework do as much
as log4j does.


-S


On Nov 17, 2005, at 1:29 PM, Steve Pruitt wrote:

> I think having the same max backup index setting for daily rolling 
> files would be useful.  I would still like to limit the sheer number 
> of log files.  I guess I can put it in the suggestion box.

Unfortunately, it is not a simple problem.  If you scan the current
directory looking for files that match the pattern, you would not handle
the case where format specifiers were used in the directory name or if
some significant part of the date was suppressed (like the year or month
was dropped).  If you did a brute force attempt, then you'd likely have
to determine from the pattern the interval to use and then walk
backwards some arbitrary duration before you decided that you did not
need to concern yourself with log files before 1960 or so.

If you use RollingFileAppender with a time based trigger and max window
rolling policy, you could do a time based rollover with a limited number
of files, but the file names would contain an index and not a formatted
date. 
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic