On 11/21/07, Guilherme Polo <[EMAIL PROTECTED]> wrote:
>
> 2007/11/21, Vladimir Rusinov <[EMAIL PROTECTED]>:
> > Hello!
> >
> > In one my project (it's logfile manager) I want to implement 'smart'
> > configuration files, e.g.
> >
> > logfile("/var/log/messages")
> > if (size() > 10*1024*1024) and (lavg() < 5):
> >     execute("my_log_alerter")
> >    rotate(save=10, compress='bzip2')
> >
> > how can I safely do this?
> >
> logging already provides the rotating
>

Yes, but apache, nginx and others does not uses logger.
I wanna write an application which would handle all my (Linux) logs:
rotating, compressing, analysing and so on (logrotate replacement), it would
require some nontrivial configuration, something like "If size of this log
bigger then 2Mb or today is sunday. If size of this log bigger then 30 Mb,
and today is not sunday, then rotate it, and make alert".
Is there any module to parse such configuration files?

-- 
Vladimir Rusinov
GreenMice Solutions: IT-решения на базе Linux
http://greenmice.info/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to