--------------------- PatchSet 5524 Date: 2002/11/30 13:54:44 Author: hno Branch: log_access-2_5 Tag: (none) Log: log_access allow|deny acl acl... 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. Members: src/cf.data.pre:1.49.2.27->1.49.2.27.4.1 src/client_side.c:1.47.2.21->1.47.2.21.4.1 src/structs.h:1.48.2.8->1.48.2.8.4.1 Index: squid/src/cf.data.pre =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cf.data.pre,v retrieving revision 1.49.2.27 retrieving revision 1.49.2.27.4.1 diff -u -r1.49.2.27 -r1.49.2.27.4.1 --- squid/src/cf.data.pre 10 Nov 2002 22:44:12 -0000 1.49.2.27 +++ squid/src/cf.data.pre 30 Nov 2002 13:54:44 -0000 1.49.2.27.4.1 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.49.2.27 2002/11/10 22:44:12 squidadm Exp $ +# $Id: cf.data.pre,v 1.49.2.27.4.1 2002/11/30 13:54:44 hno Exp $ # # # SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -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 =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.47.2.21 retrieving revision 1.47.2.21.4.1 diff -u -r1.47.2.21 -r1.47.2.21.4.1 --- squid/src/client_side.c 11 Nov 2002 22:16:28 -0000 1.47.2.21 +++ squid/src/client_side.c 30 Nov 2002 13:54:45 -0000 1.47.2.21.4.1 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.47.2.21 2002/11/11 22:16:28 squidadm Exp $ + * $Id: client_side.c,v 1.47.2.21.4.1 2002/11/30 13:54:45 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -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.reply || 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 =================================================================== RCS file: /cvsroot/squid-sf//squid/src/structs.h,v retrieving revision 1.48.2.8 retrieving revision 1.48.2.8.4.1 diff -u -r1.48.2.8 -r1.48.2.8.4.1 --- squid/src/structs.h 10 Nov 2002 22:44:13 -0000 1.48.2.8 +++ squid/src/structs.h 30 Nov 2002 13:54:46 -0000 1.48.2.8.4.1 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.48.2.8 2002/11/10 22:44:13 squidadm Exp $ + * $Id: structs.h,v 1.48.2.8.4.1 2002/11/30 13:54:46 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -601,6 +601,7 @@ acl_access *AlwaysDirect; acl_access *ASlists; acl_access *noCache; + acl_access *log; #if SQUID_SNMP acl_access *snmp; #endif