This patch is generated from the log_access-2_5 branch of s2_5 in squid Wed Sep 29 01:23:50 2004 GMT See http://devel.squid-cache.org/ Index: squid/src/cf.data.pre diff -u squid/src/cf.data.pre:1.49.2.27 squid/src/cf.data.pre:1.49.2.27.4.1 --- squid/src/cf.data.pre:1.49.2.27 Sun Nov 10 14:44:12 2002 +++ squid/src/cf.data.pre Sat Nov 30 05:54:44 2002 @@ -2271,6 +2271,17 @@ no limit imposed. DOC_END +NAME: log_access +TYPE: acl_access +LOC: Config.accessList.log +DEFAULT: none +COMMENT: allow|deny acl acl... +DOC_START + This options allows you to control which requests gets logged + to access.log (see cache_access_log directive). Requests denied + for logging will also not be accounted for in performance counters. +DOC_END + COMMENT_START ADMINISTRATIVE PARAMETERS ----------------------------------------------------------------------------- Index: squid/src/client_side.c diff -u squid/src/client_side.c:1.47.2.21 squid/src/client_side.c:1.47.2.21.4.2 --- squid/src/client_side.c:1.47.2.21 Mon Nov 11 14:16:28 2002 +++ squid/src/client_side.c Wed Feb 12 15:13:26 2003 @@ -818,9 +818,13 @@ packerClean(&p); memBufClean(&mb); } - accessLogLog(&http->al); - clientUpdateCounters(http); - clientdbUpdate(conn->peer.sin_addr, http->log_type, PROTO_HTTP, http->out.size); + if (!http->acl_checklist) + http->acl_checklist = clientAclChecklistCreate(Config.accessList.http, http); + if (!Config.accessList.log || aclCheckFast(Config.accessList.log, http->acl_checklist)) { + accessLogLog(&http->al); + clientUpdateCounters(http); + clientdbUpdate(conn->peer.sin_addr, http->log_type, PROTO_HTTP, http->out.size); + } } if (http->acl_checklist) aclChecklistFree(http->acl_checklist); Index: squid/src/structs.h diff -u squid/src/structs.h:1.48.2.8 squid/src/structs.h:1.48.2.8.4.1 --- squid/src/structs.h:1.48.2.8 Sun Nov 10 14:44:13 2002 +++ squid/src/structs.h Sat Nov 30 05:54:46 2002 @@ -601,6 +601,7 @@ acl_access *AlwaysDirect; acl_access *ASlists; acl_access *noCache; + acl_access *log; #if SQUID_SNMP acl_access *snmp; #endif