|
Posted by Roman Ziak on 03/30/06 19:59
I switched to Windows server and logs generated by my ISP are pathetic
comparing to those from Apache. I would like to do logging via PHP and
use the same log for visits and for PHP tracing. That means there can
be plenty of information and lot of file/database access. Now there is
several problems to address:
1. For performance reasons, the log messages should be collected in
array and then flushed into the file with single I/O access rather than
I/O access with appending every single record.
2. Is there some way in PHP to synchronise file access from another
concurrent request ?
3. Because of #1, the time-stamps of record from concurrent requests
may not be sorted. This should be probably addressed during processing.
4. Processing and analysing of the captured logs, recognizing visitor
sessions, unique visitors, etc.
Points 1-3 could be disregarded if database was used for logging. But I
am afraid that database access will be always slower than direct file
access.
Before I dive into coding, I would like explore if there is something
already available and I will appreciate references to scripts with good
performance and analysing utility.
Thanks
Roman
[Back to original message]
|