Re: Is there a PHP logging and analysing utility ?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Is there a PHP logging and analysing utility ?

From: Sjoerd <sjoerder@gmail.com>
Date: Thu Mar 30 2006 - 20:13:39 CEST

Roman Ziak wrote:
> 1. For performance reasons, the log messages should be collected in
> array and then flushed into the file

This is very hard. After a request has been done, the PHP script is
done and its variables are no longer there. You would have to use
shared memory or something like that. A file is much easier.

> 2. Is there some way in PHP to synchronise file access from another
> concurrent request ?

flock()

You probably want to write a Apache-like rule, so you can use standard
tools to process it. For performance, first put the rule in a string,
than lock the file, write the string, unlock the file. That should work
fast enough.
Received on Mon May 1 02:45:13 2006