aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2006-04-24 04:17:09 +0000
committerBill Marquette <billm@pfsense.org>2006-04-24 04:17:09 +0000
commite83705b9e23e3e7ecf54eb92a22130386efc83b7 (patch)
treeb12b53cd77b986c8d4754a19b568e573854543a0
parent201c15634c1baab6685a7cc58e3346ac71f70bf1 (diff)
downloadpfsense-packages-e83705b9e23e3e7ecf54eb92a22130386efc83b7.tar.gz
pfsense-packages-e83705b9e23e3e7ecf54eb92a22130386efc83b7.tar.bz2
pfsense-packages-e83705b9e23e3e7ecf54eb92a22130386efc83b7.zip
allow for access log disabling
patch-by: msamblanet with minor touches by myself
-rw-r--r--packages/squid_ng.inc16
-rw-r--r--packages/squid_ng.xml6
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
@@ -114,6 +114,12 @@
<type>checkbox</type>
</field>
<field>
+ <fielddescr>Disable Access Log</fielddescr>
+ <fieldname>accesslog_disabled</fieldname>
+ <description>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.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
<fielddescr>Log Query Terms</fielddescr>
<fieldname>log_query_terms</fieldname>
<description>This will log the complete URL rather than the part of the URL containing dynamic queries.</description>