Rotating Log-Container
| From: | Stephan Wentz | Date: | Wed, 02 Feb 2005 11:14:46 +0000 |
| Subject: | Rotating Log-Container | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-35875@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I've implemented a Log-Container for Log-1.8.7 which rotates the
logfiles based on several conditions (like filesize, number of lines,
last modification-date).
To minimize the performance-impact the conditions filesize, number of
lines and mtime are only read when the logfile is being opened.
Afterwards all changes are calculated.
The container is extending the normal file-container.
You can find the source here:
http://www.wentz.it/pear/filerotate.phps
Any comments would be helpful!
I need this container because on our managed server I can't use external
tools like logrotate to maintain the logfiles, which grow large very fast...
Bye, Stephan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCALYm8qQ9XV7tBNQRAvrEAKC67bq5SwFZkgebXRrFTPO5haoXoACfWTeY
Td85UdzTnyAX2aUv4lPWgJw=
=yL9Z
-----END PGP SIGNATURE-----