rottlog-develop
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rottlog-develop] Re: Just an idea I had


From: Frederic Connes
Subject: [Rottlog-develop] Re: Just an idea I had
Date: Wed, 18 Sep 2002 19:38:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020917

address@hidden wrote:

A specific date is a period too (each 15th of the month is a period of 30
days)...

Well, not exactly: I see it as a date with a * for the month and year. If it were a period, the delay between 2 rotations would be constant: here it varies between 28 and 31, so what's constant is the date.



So maybe it's worth being explicit about it and use two variables:
- period
- date

I think it's better to merge two syntaxes in one parameter.
period parameter will be a very powerful option...

Ok, let's have a loose definition of what a period is ;)
Are you sure it won't add some complexity to the syntax ?



What would be great would be to be able to AND and OR the dates, so one could say:
date mon,tue,wed,thu,fri 13:00,20:00
date sat 20:00
(this would then allow some very powerful enhancements like mon-fri or a NOT operator)

I'm thinking to a period parameter able to handle:
period mon 10:00,fri-wed 23:00
period !mon 20:00,10:00
period 15d 10:00,22:00
period 7 13:00
period jan-jun 23:00,jul-sep 10:00,oct-dec 23:00 (*) period !jul-sep 23:00,10:00 (*)

(*) They are equivalent

Where:
  space = AND
  comma = OR
  !     = NOT
- = interval

Wow, that's really cool !



Now, about the files:
Rottlog uses 3 files, which correspond to the most current rotation periods. I think it is possible to extend this to something fully customizable.

Very interesting. But this will be a very big change to the behavoir of
rottlog. I think that for now we can spend our time to add use of custom config file and improve period parameter. We will talk about these very
interesting ideas just after this... I hope this decision will not hurt
you...

Of course not, make yourself easy ;)
I also think the priority is to have a working period parameter.
Then we'll see about the files.


[...]

apache {
  date mon,tue,wed,thu,fri 13:00,20:00
  date sat 20:00
}
if for instance you have many virtual hosts and want to group your apache log files

You can already do something similar with "include" directive and
meta-variables. Example:

file: apache.rtl
/var/www/www.domain1.com/log/access.log,/var/www/www.domain2.com/log/access.log 
{
  storedir @3
  createdir
  period mon,tue,wed,thu,fri 13:00,20:00
  ....
}
apache.rtl file can be included in custom config file.

Ok. But the period still needs to be included in each statement.
What about being able to start a file with an external period statement and then include daily, weekly and monthly in custom ?
For example, daily would start with:
period 1d
file1 {
  ...
}
...

This way:
- it would be clear, inside a file, when it is called
- there would only be one file (custom) that calls all the others, so the design would be quite modular: eg, if I don't want the monthly file, I just drop the include monthly line in custom. - maybe custom should be renamed to reflect that it is the "main" rotation configuration file, and an rc option added to allow to customize the name.
But ok, let's see that after period.



I think this way it would be possible to organize the rotation as in the current rottlog or as in logrotate or as the user wants to.

If a user wants to use only one file can use custom config file... I think I
will improve my Log2Rot script (a test-version of a script that converts
logrotate config files to rottlog config files...)

Ok.


I've open a project on savannah.org. I will add a mailing list for
developers. We will talk on that list.
If you want I can add you to the list of developers...

With pleasure !





reply via email to

[Prev in Thread] Current Thread [Next in Thread]