[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Rottlog-develop] Just an idea I had
From: |
Frederic Connes |
Subject: |
[Rottlog-develop] Just an idea I had |
Date: |
Sun, 08 Sep 2002 18:47:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020731 |
Hi Stefano,
I thought about something for rottlog yesterday. Please tell me if
that's not the way you want rottlog to be used.
Now, there are 4 configuration files, including 3 for the rotate operations.
What I thought is that:
- it's not easy to tell: rotate every 3 days, or each sunday, or each
15th of the month (ok, it's possible but not very intuitive)
- usually one won't really use the 3 files: people will mainly use the
one that fits their needs, depending of the amount of logs they have.
There may be exceptions if for instance you're running a web server, but
usually one file is more filled than the others.
So here's my suggestion:
- use only 2 files: rc and rotate (or any other name)
- rotate has the same syntax that daily/weekly/monthly, but it's
possible (not mandatory) to include a rotate_on= parameter in each
logfile entry
- the format of the rotate_on parameter would be (for example):
- *: each time rottlog is run
- 1d: every day
- 3d: every 3 days
- sun: every sunday
- wed,tue: every monday and tuesday
- 15: every 15th of the month
- 1m: every month
- sep: each september
so, cut the input with "," and check the first character:
- * -> rotate
- number -> find last char, get number, check date
- char -> get first 3 chars (so it could be possible to write the
complete day/month name), find if it's a day or month, check date
- rc can contain a rotate= parameter, which is used when no rotate
parameter is present for a logfile
- if no rotate parameter is given in rc, asume it is * (so that it
could be possible to configure the cron if something can't be handled by
rottlog)
I think this would make rottlog the very tool to rotate logs.
See you,
Fred
- [Rottlog-develop] Just an idea I had,
Frederic Connes <=