summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2007-07-04 12:09:04 +0000
committerSeth Mos <seth.mos@xs4all.nl>2007-07-04 12:09:04 +0000
commitbe41c19386e0c5afdaf1e18bbfb42256829c2806 (patch)
tree4720b0800cbf43766c2830db41360690c6b7ea9b
parent22ff4a6e61cdf9eb283f96312a9eb61b9dc92d8a (diff)
downloadpfsense-be41c19386e0c5afdaf1e18bbfb42256829c2806.zip
pfsense-be41c19386e0c5afdaf1e18bbfb42256829c2806.tar.gz
Supress debug logging
-rw-r--r--etc/inc/filter.inc23
1 files changed, 15 insertions, 8 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index a662c9c..eeee07f 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -885,7 +885,8 @@ function filter_nat_rules_generate() {
$realif = convert_friendly_interface_to_real_interface_name(strtolower($ifname));
$int_ip = find_interface_ip($realif);
if(isset($config['interfaces'][strtolower($ifname)]['disableftpproxy'])) {
- log_error("Filter: FTP proxy disabled for interface {$ifname} - ignoring.");
+ if($g['debug'])
+ log_error("Filter: FTP proxy disabled for interface {$ifname} - ignoring.");
$interface_counter++;
continue;
}
@@ -910,11 +911,13 @@ function filter_nat_rules_generate() {
}
}
if($sourcenat == 0) {
- log_error("Filter: No AON rule matched for interface {$ifname} - not using the FTP proxy");
+ if($g['debug'])
+ log_error("Filter: No AON rule matched for interface {$ifname} - not using the FTP proxy");
$interface_counter++;
continue;
} else {
- log_error("Filter: AON Rule matched for interface {$ifname} - using FTP proxy");
+ if($g['debug'])
+ log_error("Filter: AON Rule matched for interface {$ifname} - using FTP proxy");
}
}
$tmp_port = 8021 + $interface_counter;
@@ -1616,17 +1619,20 @@ function generate_user_filter_rule($rule, $ngcounter) {
}
}
$lbs_count = count($lbs);
- log_error("We found $lbs_count valid entries in status file {$g['tmp_path']}/{$lb['name']}.pool");
+ if($g['debug'])
+ log_error("We found $lbs_count valid entries in status file {$g['tmp_path']}/{$lb['name']}.pool");
if(count($lbs) == 0) {
- log_error("There are no servers found in the status file, using XML config settings!");
+ if($g['debug'])
+ log_error("There are no servers found in the status file, using XML config settings!");
foreach ($lb['servers'] as $lbsvr) {
$lbsvr_split = split("\|", $lbsvr);
$lbs[] = $lbsvr_split[1];
}
}
} else {
- log_error("There is no server status file, using XML config settings!");
+ if($g['debug'])
+ log_error("There is no server status file, using XML config settings!");
$lbs = array();
foreach ($lb['servers'] as $lbsvr) {
$lbsvr_split = split("\|", $lbsvr);
@@ -1670,7 +1676,8 @@ function generate_user_filter_rule($rule, $ngcounter) {
$gateway = get_interface_gateway($lbconfig['gateway'][$l]);
}
if(($int <> "") && ($gateway <> "")) {
- log_error("Setting up route with {$lbconfig['gateway'][$l]} om $int for monitor {$lbconfig['monitor'][$l]} on gateway $gateway");
+ if($g['debug'])
+ log_error("Setting up route with {$lbconfig['gateway'][$l]} om $int for monitor {$lbconfig['monitor'][$l]} on gateway $gateway");
if($foundlb == 1)
$routeto .= ", ";
$routeto .= "( {$int} {$gateway} ) ";
@@ -3305,4 +3312,4 @@ function return_vpn_subnet($adr) {
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud