From e83705b9e23e3e7ecf54eb92a22130386efc83b7 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Mon, 24 Apr 2006 04:17:09 +0000 Subject: allow for access log disabling patch-by: msamblanet with minor touches by myself --- packages/squid_ng.inc | 16 +++++++++++----- packages/squid_ng.xml | 6 ++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/squid_ng.inc b/packages/squid_ng.inc index 0b4aa855..32cf68ca 100644 --- a/packages/squid_ng.inc +++ b/packages/squid_ng.inc @@ -44,7 +44,8 @@ function global_write_squid_config() $active_interface = $config['installedpackages']['squid']['config'][0]['active_interface']; $transparent_proxy = $config['installedpackages']['squid']['config'][0]['transparent_proxy']; $log_enabled = $config['installedpackages']['squid']['config'][0]['log_enabled']; - $urlfier_enable = $config['installedpackages']['squid']['config'][0]['urlfilter_enable']; + $urlfier_enable = $config['installedpackages']['squid']['config'][0]['urlfilter_enable']; + $accesslog_disabled = $config['installedpackages']['squid']['config'][0]['accesslog_disabled']; $log_query_terms = $config['installedpackages']['squid']['config'][0]['log_query_terms']; $log_user_agents = $config['installedpackages']['squid']['config'][0]['log_user_agents']; $proxy_port = $config['installedpackages']['squid']['config'][0]['proxy_port']; @@ -221,10 +222,15 @@ function global_write_squid_config() } $config_array[] = 'cache_replacement_policy ' . $cache_replacement . "\n\n"; unset($cache_replacement); - - $config_array[] = 'cache_access_log /var/log/access.log' . "\n"; + + if (isset($accesslog_disabled) && ($accesslog_disabled == "on")) { + $config_array[] = 'cache_access_log none' . "\n"; + } else { + $config_array[] = 'cache_access_log /var/log/access.log' . "\n"; + } $config_array[] = 'cache_log /var/log/cache.log' . "\n"; $config_array[] = 'cache_store_log none' . "\n"; + unset($accesslog_disabled); unset($log_enabled); if (isset($log_query_terms) && ($log_query_terms == "on")) { @@ -956,8 +962,8 @@ function write_static_squid_config() { fwrite($fout, "cache_replacement_policy heap GDSF\n"); fwrite($fout, "\n"); - fwrite($fout, "cache_access_log /dev/null\n"); - fwrite($fout, "cache_log /dev/null\n"); + fwrite($fout, "cache_access_log none\n"); + fwrite($fout, "cache_log none\n"); fwrite($fout, "cache_store_log none\n"); fwrite($fout, "\n"); diff --git a/packages/squid_ng.xml b/packages/squid_ng.xml index 8f1c5719..6d98f00f 100644 --- a/packages/squid_ng.xml +++ b/packages/squid_ng.xml @@ -113,6 +113,12 @@ This enables the advanced functionality in conjunction with squidGuard to provide an array of URL filtering options. This squidGuard functionality can be additionally configured from Services -> Advanced Proxy Filtering checkbox + + Disable Access Log + accesslog_disabled + Disable the access log entirely. By default, Squid keeps a log of all requests it processes in /var/log/access.log. This can grow to be fairly large. If you do not require this logging, check this box to disable. + checkbox + Log Query Terms log_query_terms -- cgit v1.2.3