]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GContact.php
Logger Levels
[friendica.git] / src / Model / GContact.php
index a220a592112bcb3d7cba9aec10846e2b02dc205f..398fc77588766a3ed6609d5ef91ca20aaf2c0a24 100644 (file)
@@ -589,7 +589,7 @@ class GContact
                }
 
                if ($new_url != $url) {
-                       Logger::log("Cleaned contact url ".$url." to ".$new_url." - Called by: ".System::callstack(), LOGGER_DEBUG);
+                       Logger::log("Cleaned contact url ".$url." to ".$new_url." - Called by: ".System::callstack(), Logger::DEBUG);
                }
 
                return $new_url;
@@ -606,7 +606,7 @@ class GContact
                if (($contact["network"] == Protocol::OSTATUS) && PortableContact::alternateOStatusUrl($contact["url"])) {
                        $data = Probe::uri($contact["url"]);
                        if ($contact["network"] == Protocol::OSTATUS) {
-                               Logger::log("Fix primary url from ".$contact["url"]." to ".$data["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
+                               Logger::log("Fix primary url from ".$contact["url"]." to ".$data["url"]." - Called by: ".System::callstack(), Logger::DEBUG);
                                $contact["url"] = $data["url"];
                                $contact["addr"] = $data["addr"];
                                $contact["alias"] = $data["alias"];
@@ -630,12 +630,12 @@ class GContact
                $last_contact_str = '';
 
                if (empty($contact["network"])) {
-                       Logger::log("Empty network for contact url ".$contact["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
+                       Logger::log("Empty network for contact url ".$contact["url"]." - Called by: ".System::callstack(), Logger::DEBUG);
                        return false;
                }
 
                if (in_array($contact["network"], [Protocol::PHANTOM])) {
-                       Logger::log("Invalid network for contact url ".$contact["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
+                       Logger::log("Invalid network for contact url ".$contact["url"]." - Called by: ".System::callstack(), Logger::DEBUG);
                        return false;
                }
 
@@ -703,7 +703,7 @@ class GContact
                DBA::unlock();
 
                if ($doprobing) {
-                       Logger::log("Last Contact: ". $last_contact_str." - Last Failure: ".$last_failure_str." - Checking: ".$contact["url"], LOGGER_DEBUG);
+                       Logger::log("Last Contact: ". $last_contact_str." - Last Failure: ".$last_failure_str." - Checking: ".$contact["url"], Logger::DEBUG);
                        Worker::add(PRIORITY_LOW, 'GProbe', $contact["url"]);
                }
 
@@ -808,19 +808,19 @@ class GContact
                if ((($contact["generation"] > 0) && ($contact["generation"] <= $public_contact[0]["generation"])) || ($public_contact[0]["generation"] == 0)) {
                        foreach ($fields as $field => $data) {
                                if ($contact[$field] != $public_contact[0][$field]) {
-                                       Logger::log("Difference for contact ".$contact["url"]." in field '".$field."'. New value: '".$contact[$field]."', old value '".$public_contact[0][$field]."'", LOGGER_DEBUG);
+                                       Logger::log("Difference for contact ".$contact["url"]." in field '".$field."'. New value: '".$contact[$field]."', old value '".$public_contact[0][$field]."'", Logger::DEBUG);
                                        $update = true;
                                }
                        }
 
                        if ($contact["generation"] < $public_contact[0]["generation"]) {
-                               Logger::log("Difference for contact ".$contact["url"]." in field 'generation'. new value: '".$contact["generation"]."', old value '".$public_contact[0]["generation"]."'", LOGGER_DEBUG);
+                               Logger::log("Difference for contact ".$contact["url"]." in field 'generation'. new value: '".$contact["generation"]."', old value '".$public_contact[0]["generation"]."'", Logger::DEBUG);
                                $update = true;
                        }
                }
 
                if ($update) {
-                       Logger::log("Update gcontact for ".$contact["url"], LOGGER_DEBUG);
+                       Logger::log("Update gcontact for ".$contact["url"], Logger::DEBUG);
                        $condition = ['`nurl` = ? AND (`generation` = 0 OR `generation` >= ?)',
                                        normalise_link($contact["url"]), $contact["generation"]];
                        $contact["updated"] = DateTimeFormat::utc($contact["updated"]);
@@ -844,7 +844,7 @@ class GContact
                        // The quality of the gcontact table is mostly lower than the public contact
                        $public_contact = DBA::selectFirst('contact', ['id'], ['nurl' => normalise_link($contact["url"]), 'uid' => 0]);
                        if (DBA::isResult($public_contact)) {
-                               Logger::log("Update public contact ".$public_contact["id"], LOGGER_DEBUG);
+                               Logger::log("Update public contact ".$public_contact["id"], Logger::DEBUG);
 
                                Contact::updateAvatar($contact["photo"], 0, $public_contact["id"]);
 
@@ -886,7 +886,7 @@ class GContact
                $data = Probe::uri($url);
 
                if (in_array($data["network"], [Protocol::PHANTOM])) {
-                       Logger::log("Invalid network for contact url ".$data["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
+                       Logger::log("Invalid network for contact url ".$data["url"]." - Called by: ".System::callstack(), Logger::DEBUG);
                        return;
                }
 
@@ -917,7 +917,7 @@ class GContact
                );
 
                if (!DBA::isResult($r)) {
-                       Logger::log('Cannot find user with uid=' . $uid, LOGGER_INFO);
+                       Logger::log('Cannot find user with uid=' . $uid, Logger::INFO);
                        return false;
                }
 
@@ -954,7 +954,7 @@ class GContact
         */
        public static function fetchGsUsers($server)
        {
-               Logger::log("Fetching users from GNU Social server ".$server, LOGGER_DEBUG);
+               Logger::log("Fetching users from GNU Social server ".$server, Logger::DEBUG);
 
                $url = $server."/main/statistics";