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 = 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


signature.asc
Description: This is a digitally signed message part


HTCP documentation

2008-11-27 Thread Mark Nottingham
From http://www.squid-cache.org/Versions/v2/2.7/cfgman/ 
cache_peer.html:
use 'htcp' to send HTCP, instead of ICP, queries to the neighbor.  
You probably also want to set the icp port to 4827 instead of  
3130. You must also allow this Squid htcp_access and http_access in  
the peer Squid configuration.
Is the You probably want to set... sentence still true? I.e., isn't  
htcp_port enough?



--
Mark Nottingham   [EMAIL PROTECTED]




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 url.

Regards
Henrik