Harmeet,
> There may be log files that rarely change. No need to rotate them daily.
Each log file is independently configurable. But I'm not terribly inclined
to guess what custom configuration everyone will want in their logs. We
have to pick a default pattern and policy set, and stick with it. If our
users indicate some sort of broad agreement on how they typically want logs
rotated, we can make that the default.
> The log file size could grow without upper bound even within a day.
Anyone who wants to can reconfigure the log rotation. Most administrators
rotate logs, if they rotate them, on a periodic basis. The way Avalon
rotates using a date, logs can rotate hourly, daily, monthly, or yearly.
They could rotate at specific points during the day with a <time> element,
or when a size is reached with a <size> element.
For example, the current:
<rotation type="unique" pattern="-yyyy-MM-dd" suffix=".log">
<or>
<date>dd</date>
</or>
</rotation>
rotates that log daily. Adding
<size>1048576</size>
would rotate at a 1MB boundary, within the day.
However, because of the way Avalon's UniqueFileStrategy class constructs the
filename, simply adding another rotation policy won't work properly if
rotation can occur more often than daily. The pattern attribute is only set
for daily rotation. We'd need to change the pattern to be something like
"-yyyy-MM-dd-hh" to allow rotation (for whatever reason) hourly, or
"-yyyy-MM-dd-hh-mm" if the log could rotate more than once within an hour.
So instead of having a file name like:
smtpserver-2003-01-26.log
we'd have to have:
smtpserver-2003-01-26-18.log or smtpserver-2003-01-26-18-30.log
if we expect to rotate more than daily.
I am willing to put this information into the Wiki, and into an FAQ, for our
users to customize their logging, but I am not planning to write an entire
tutorial on Avalon log rotation.
--- Noel
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>