On Mon, Dec 29, 2003 at 01:39:28PM +0000, Ben Laurie wrote:
So, I've written a forensic logging module. What this does is log the request as soon as all the headers have been read, then log again when its complete. Any request that doesn't complete should be viewed with great suspicion!
Cool, extremely useful in a lot of circumstances. Just one or two questions though. Is next_id deliberately random? It doesn't seem to get initialised anywhere, though that may be a feature.
Static variables are initialised to zero.
Could the forensic_id be tied in with mod_unique_id? It seems confusing to have two different methods to generate unique id's for requests. Also with unique_id, I can see it being useful to make CGI's aware of their "tracking code" via the environment variable. That way a developer can use the same id to track ingress, processing and egress.
Well, it would be possible to make it use the unique ID if present. I'm not in favour of requiring it, though, because it appears add a good deal of unnecessary overhead.
Or at least, could a host-specific part be added to the forensic id? A lot of people collate logs (myself included ;) from clusters or whatever and this would make life much easier there.
Hmmm. You should only be looking at requests that didn't complete, and since it includes the whole header, the host is in there anyway.
Cheers,
Ben.
-- http://www.apache-ssl.org/ben.html http://www.thebunker.net/
"There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff