Re: Rotating Log-Container
| From: | bertrand Gugger | Date: | Fri, 04 Feb 2005 10:02:49 +0000 |
| Subject: | Re: Rotating Log-Container | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35935@lists.php.net to get a copy of this message | ||
Ants Aasma wrote:
Am I missing something or would using a lockfile (or directory) help? Something like: o check rotate trigger o if need to rotate o try to acquire lock o if blocked continue as we were else rotate logs and release lock o continue with logging as usual. Seems without raceconditions to me. BTW: Rotating logfiles seem a perfectly useful and appropriate Log target to me.Sure you're right, that would solve the problem. But as it is log file, it's outer proportion to block a script, just because another is rotating. Anyway that should never be the logging scripts themselves that should do the rotate. Should be done from one unique admin point outer production scripts. à+ -- bertrand Gugger (toggg)