------------------------------------------------------------ revno: 13221 revision-id: squid3@treenet.co.nz-20150501071104-vd21fu43lvmqoqwa parent: squidadm@squid-cache.org-20150423142451-cdbu1lmy5p25x3uw committer: Amos Jeffries branch nick: 3.4 timestamp: Fri 2015-05-01 00:11:04 -0700 message: Fix 'access_log none' to prevent following logs being used The documented behaviour of "access_log none" for preventing logging using log lines following the directive has not been working in Squid-3 for some time. Since the 'none' type does not have a log module associated the entire switch logic where its abort is checked for was being skipped. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20150501071104-vd21fu43lvmqoqwa # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # testament_sha1: 0cea8f51cdd14551778af26a8fc89b60c1d6cb20 # timestamp: 2015-05-01 07:17:23 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # base_revision_id: squidadm@squid-cache.org-20150423142451-\ # cdbu1lmy5p25x3uw # # Begin patch === modified file 'src/log/access_log.cc' --- src/log/access_log.cc 2013-05-11 20:59:44 +0000 +++ src/log/access_log.cc 2015-05-01 07:11:04 +0000 @@ -118,6 +118,10 @@ if (log->aclList && checklist && checklist->fastCheck(log->aclList) != ACCESS_ALLOWED) continue; + // The special-case "none" type has no logfile object set + if (log->type == Log::Format::CLF_NONE) + return; + if (log->logfile) { logfileLineStart(log->logfile); @@ -153,9 +157,6 @@ break; #endif - case Log::Format::CLF_NONE: - return; // abort! - default: fatalf("Unknown log format %d\n", log->type); break;