]> git.mxchange.org Git - friendica.git/commitdiff
Improved logging
authorMichael Vogel <icarus@dabo.de>
Wed, 20 Apr 2016 05:48:21 +0000 (07:48 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 20 Apr 2016 05:48:21 +0000 (07:48 +0200)
include/socgraph.php

index d13dc1cd63084abb49897d959fd625b6bd3ee891..54ed62c0e5115374c39027867e69ae10e9d28574 100644 (file)
@@ -1374,6 +1374,9 @@ function clean_contact_url($url) {
         if (isset($parts["path"]))
                 $new_url .= $parts["path"];
 
+       if ($new_url != $url)
+               logger("Cleaned contact url ".$url." to ".$new_url." - Called by: ".App::callstack(), LOGGER_DEBUG);
+
         return $new_url;
 }
 
@@ -1386,7 +1389,7 @@ function fix_alternate_contact_address(&$contact) {
        if (($contact["network"] == NETWORK_OSTATUS) AND poco_alternate_ostatus_url($contact["url"])) {
                $data = probe_url($contact["url"]);
                if ($contact["network"] == NETWORK_OSTATUS) {
-                       logger("Fix primary url from ".$contact["url"]." to ".$data["url"], LOGGER_DEBUG);
+                       logger("Fix primary url from ".$contact["url"]." to ".$data["url"]." - Called by: ".App::callstack(), LOGGER_DEBUG);
                        $contact["url"] = $data["url"];
                        $contact["addr"] = $data["addr"];
                        $contact["alias"] = $data["alias"];
@@ -1405,8 +1408,10 @@ function get_gcontact_id($contact) {
 
        $gcontact_id = 0;
 
-       if (in_array($contact["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))
+       if (in_array($contact["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
+               logger("Invalid network for contact url ".$contact["url"]." - Called by: ".App::callstack(), LOGGER_DEBUG);
                return false;
+       }
 
        if ($contact["network"] == NETWORK_STATUSNET)
                $contact["network"] = NETWORK_OSTATUS;
@@ -1595,8 +1600,10 @@ function update_gcontact($contact) {
 function update_gcontact_from_probe($url) {
        $data = probe_url($url);
 
-       if (in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))
+       if (in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
+               logger("Invalid network for contact url ".$data["url"]." - Called by: ".App::callstack(), LOGGER_DEBUG);
                return;
+       }
 
        update_gcontact($data);
 }