Lars Aronsson wrote:
We did discuss this before, and someone was guessing
that
appending a line to a file would take too much time, but I don't think
anybody tested this. The append to file could be conditioned so only
accesses that took more than 2 (or 5) seconds were logged.
In my opinion, this would work just fine. At bomis, which is run on
fastcgi/perl scripts cruder than you can possibly imagine, I
frequently hand-tune things by writing logfiles in this fashion. At
least in perl/fastcgi, appending loglines to a file is fast enough
that it plays only the very tiniest role in the overall performance of
the site.
It's a very useful tool for getting a mental picture of what's going on.
--Jimbo