Re: Rotating Log-Container
| From: | Stephan Wentz | Date: | Fri, 04 Feb 2005 08:08:50 +0000 |
| Subject: | Re: Rotating Log-Container | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35931@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
bertrand Gugger wrote:
| Stephan Wentz wrote:
|
|> But is it really necessary?
|>
|> Having $maxFiles=4 would do this on a rotate:
|>
|> logfile.3 -> logfile.4
|> logfile.2 -> logfile.3
|> logfile.1 -> logfile.2
|> logfile -> logfile.1
|>
|> If another process interferes with this it would try to move a
|> non-existing file,
|
|
| process 1: logfile.2 -> logfile.3
| process 2: logfile.3 -> logfile.4
| so globally we have: logfile.2 -> logfile.4
hmm... yea, you're right.
|> | BTW: why don't you do that from a cron job, just checking log file
|> size,
|> | rename it if necessary and remove oldest log file that are too much ?
|> | as the system do :)
|> | It would be transparent for the PHP scripts and you don't need extra
|> | archive class.
|>
|> Because I can't. Project is hosted on a managed server, I don't have any
|> access to the machine!
|
|
| Come on, you have acces thru php, the same as your Rotating
| Log-Container script.
| So isolate that in a script you request each hour.
ok, this sounds like a reasonable solution ;-)
thanks, stephan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCAy2S8qQ9XV7tBNQRAgaiAJ9dcNg0ZmYPNV8/pOE5ayrSMy2VswCgthfo
+E/J/qk4zD6o8MiYKtaelUI=
=1noI
-----END PGP SIGNATURE-----