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?
>
> --
> Vladimir Rusinov
> GreenMice Solutions: IT-решения на базе Linux
>  http://greenmice.info/
> --
> http://mail.python.org/mailman/listinfo/python-list
>
logging already provides the rotating

from logging.handlers import RotatingFileHandler
help(RotatingFileHandler)


-- 
-- Guilherme H. Polo Goncalves
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to