Re: Associating accesses with cache.log entries

2009-12-17 Thread Mark Nottingham
I've put a basic proof-of-concept into a bug; see http://bugs.squid-cache.org/show_bug.cgi?id=2835. It only logs client FDs, but gives output like this (with debug_options ALL,2): 2009/12/17 22:08:24 client_fd=13 ctx: enter level 0: 'client_fd=13' 2009/12/17 22:08:24 client_fd=13 Parser:

Re: Associating accesses with cache.log entries

2009-12-17 Thread Mark Nottingham
I've made some progress on this, now adding a request identifier and putting that in the context (see updated patch in bug). I'm willing to see this through, but I'd like a bit of feedback first -- especially around whether this (i.e., sprinkling ctx_* calls throughout the codebase wherever we

Re: Associating accesses with cache.log entries

2009-02-24 Thread Mark Nottingham
Not sure I follow. ctx_enter is called relatively late, in httpProcessReplyHeader and destroy_MemObject; I'd think for this case we need to have a request id associated quite early, probably around parseHttpRequest. Also, AFAICT Ctx_Descrs and Ctx_Current_Level isn't really a reliable

Re: Associating accesses with cache.log entries

2009-02-24 Thread Henrik Nordstrom
ons 2009-02-25 klockan 12:10 +1100 skrev Mark Nottingham: What am I missing? The most straightforward way that I can see to do this is to add an identifier to clientHttpRequest and pass that to debug where available... That is what ctx_enter is about... There is not a single location

Re: Associating accesses with cache.log entries

2008-12-11 Thread Alex Rousskov
On Thu, 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 snip * How do people feel about putting this in cache.log all the time? I don't think it'll break any scripts (there aren't many, and

Re: Associating accesses with cache.log entries

2008-12-11 Thread Amos Jeffries
Alex Rousskov wrote: On Thu, 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 snip * How do people feel about putting this in cache.log all the time? I don't think it'll break any scripts

Re: Associating accesses with cache.log entries

2008-12-11 Thread Alex Rousskov
On Fri, 2008-12-12 at 10:23 +1300, Amos Jeffries wrote: OOoh.. can you dump that in the scripts directory for the rest of us? Sure, I have been planning to polish and commit for a long time. Please bug me if I do not do it soon. Thank you, Alex.

Re: Associating accesses with cache.log entries

2008-11-27 Thread Henrik Nordstrom
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 =

Re: Associating accesses with cache.log entries

2008-11-27 Thread Henrik Nordstrom
fre 2008-11-28 klockan 10:34 +1100 skrev Mark Nottingham: Agreed. How would you pass it into debug()? It looks like _db_print already takes variable length args, By adding it to the context already used by _db_print.. i.e. by extending ctx_enter to take the sequence number in addition to

Associating accesses with cache.log entries

2008-11-26 Thread Mark Nottingham
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); }

Re: Associating accesses with cache.log entries

2008-11-26 Thread Kinkie
On Thu, Nov 27, 2008 at 4:21 AM, Mark Nottingham [EMAIL PROTECTED] 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) {