From 529d9e3500fcc457c5adcfe562ed8d9181defdf1 Mon Sep 17 00:00:00 2001 From: Arjen Baart Date: Fri, 25 Sep 2020 17:45:55 +0200 Subject: [PATCH] gcm_deamon: clean up debug output --- depends | 1 + src/gcm_daemon/gcm_daemon.php | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 depends diff --git a/depends b/depends new file mode 100644 index 0000000..2052c03 --- /dev/null +++ b/depends @@ -0,0 +1 @@ +xmldoc libacl diff --git a/src/gcm_daemon/gcm_daemon.php b/src/gcm_daemon/gcm_daemon.php index 17338a0..a9da99b 100755 --- a/src/gcm_daemon/gcm_daemon.php +++ b/src/gcm_daemon/gcm_daemon.php @@ -222,7 +222,7 @@ if ($dbms->fetch_row() == "TRUE") do { - echo "Processing logs...\n"; + //echo "Processing logs...\n"; process_log (); service_check(); //mail_notifications(); @@ -233,7 +233,7 @@ do for ($obj = 0; $obj < $dbms->num_rows($obj_result); $obj++) { $object = $dbms->fetch_object($obj_result, $obj); - echo "Gathering statistics for object " . $object->objectid . "\n"; + // echo "Gathering statistics for object " . $object->objectid . "\n"; GatherStatistics($object->objectid); } @@ -272,7 +272,7 @@ function process_log () $last_log = $dbms->db_result_row[0]; } - echo "Last processed logid = $last_log \n"; + //echo "Last processed logid = $last_log \n"; //Query the log-table $log_limit = $last_log + BATCHSIZE; @@ -490,14 +490,14 @@ function match_log_patterns($logstart) $notif = 'abuses exceeded'; if (!isset($notifications[$logentry->objectid][$notif][$source_ip])) { - echo "Creating notification $notif for object " . $logentry->objectid . ".\n"; + //echo "Creating notification $notif for object " . $logentry->objectid . ".\n"; $remark = "Abuses from IP address $source_ip exceeded the limit."; $notifid = $dbms->new_notification($logentry->objectid, $notif, $remark); $notifications[$logentry->objectid][$notif][$source_ip] = $notifid; // Add log entries from previously detected abuses - echo " Add log entries from previously detected abuses\n"; + //echo " Add log entries from previously detected abuses\n"; $abuses = $dbms->query("SELECT logid FROM log_abuse WHERE objectid = '" . $logentry->objectid . "' AND source = '$source_ip'"); for ($abusenr = 0; $abusenr < $dbms->num_rows($abuses); $abusenr++) @@ -622,7 +622,7 @@ function service_check() VALUES ('log_servicecheck', '0')"); } - echo "Running service check from log id $last_log.\n"; + //echo "Running service check from log id $last_log.\n"; // Query the log-table $log_limit = $last_log + BATCHSIZE; @@ -768,4 +768,3 @@ function ereg_replace($pattern, $replacement, $string) return preg_replace($pattern, $replacement, $string); } ?> - -- 2.11.0