Re: Associating accesses with cache.log entries

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Thu, 27 Nov 2008 21:19:28 +0100

On tor, 2008-11-27 at 14:21 +1100, Mark Nottingham wrote:
> I've been playing around with associating specific requests with the
> debug output they generate, with a simple patch to _db_print along
> these lines:
>
> if (Config.Log.accesslogs && Config.Log.accesslogs->logfile) {
> seqnum = LOGFILE_SEQNO(Config.Log.accesslogs->logfile);
> }
> snprintf(f, BUFSIZ, "%s %i| %s",
> debugLogTime(squid_curtime),
> seqnum,
> format);

Hmm.. I don't really see how this implementation is different from a
detailed timestamp.

a) It's not associated with the current request, just the last request
logged (or perhaps the next).

b) There is no direct correlation between cache.log and access.log
timing. Requests may well have notices in cache.log long before when
they are logged.

> * Is it reasonable to hardcode this to associate the numbers with the
> first configured access_log?

I would argue that there needs to be a "request sequence number"
associated early in the request processing, not related to access.log.
Available for logging in access.log but not derived from there.

> * To make this really useful, it would be necessary to be able to
> trigger debug_options (or just all debugging) based upon an ACL match.
> However, this looks like it would require changing how debug is
> #defined. Any comments on this?

Time to add some lua hooks? (or similar)

Regards
Henrik

Received on Thu Nov 27 2008 - 20:19:35 MST

This archive was generated by hypermail 2.2.0 : Fri Nov 28 2008 - 12:00:06 MST