gcm_deamon: clean up debug output
authorArjen Baart <arjen@andromeda.nl>
Fri, 25 Sep 2020 15:45:55 +0000 (17:45 +0200)
committerArjen Baart <arjen@andromeda.nl>
Fri, 25 Sep 2020 15:45:55 +0000 (17:45 +0200)
depends [new file with mode: 0644]
src/gcm_daemon/gcm_daemon.php

diff --git a/depends b/depends
new file mode 100644 (file)
index 0000000..2052c03
--- /dev/null
+++ b/depends
@@ -0,0 +1 @@
+xmldoc libacl
index 17338a0..a9da99b 100755 (executable)
@@ -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);
 }
 ?>
-