mirror of
https://github.com/friendica/friendica
synced 2024-12-24 01:20:16 +00:00
Improved logging
This commit is contained in:
parent
e088b919a8
commit
8fb9f3fee5
1 changed files with 10 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue