aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dba.php7
-rw-r--r--include/items.php3
-rw-r--r--include/notifier.php5
-rw-r--r--include/salmon.php11
4 files changed, 12 insertions, 14 deletions
diff --git a/include/dba.php b/include/dba.php
index 0e790d4c1..133b596ef 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -58,8 +58,11 @@ class dba {
}
}
else {
- if(($result === false) && (file_exists('dbfail.out')))
- file_put_contents('dbfail.out', printable($sql) . ' returned false' . "\n", FILE_APPEND);
+ if($result === false) {
+ logger('dba: ' . printable($sql) . ' returned false.');
+ if(file_exists('dbfail.out'))
+ file_put_contents('dbfail.out', printable($sql) . ' returned false' . "\n", FILE_APPEND);
+ }
}
if(($result === true) || ($result === false))
diff --git a/include/items.php b/include/items.php
index fa07727de..f11bebf50 100644
--- a/include/items.php
+++ b/include/items.php
@@ -923,8 +923,7 @@ function consume_feed($xml,$importer,$contact, &$hub) {
$datarray = get_atom_elements($feed,$item);
if($datarray['verb'] === ACTIVITY_FOLLOW) {
- if($debugging)
- file_put_contents('salmon.out',"\n" . 'New follower.' . "\n", FILE_APPEND);
+ logger('consume-feed: New follower');
new_follower($importer,$contact,$datarray,$item);
return;
}
diff --git a/include/notifier.php b/include/notifier.php
index 069f3bdf2..cd75c1fff 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -343,10 +343,7 @@
continue;
$params = 'hub.mode=publish&hub.url=' . urlencode($a->get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
post_url($h,$params);
- if($debugging) {
- file_put_contents('pubsub.out', "\n\n" . "Pinged hub " . $h . ' at '
- . datetime_convert() . "\n" . "Hub returned " . $a->get_curl_code() . "\n\n" , FILE_APPEND);
- }
+ logger('pubsub: publish: ' . $h . ' returned ' . $a->get_curl_code());
if(count($hubs) > 1)
sleep(7); // try and avoid multiple hubs responding at precisely the same time
}
diff --git a/include/salmon.php b/include/salmon.php
index e93ec23d7..872dcd5f3 100644
--- a/include/salmon.php
+++ b/include/salmon.php
@@ -29,9 +29,7 @@ function base64url_decode($s) {
function get_salmon_key($uri,$keyhash) {
$ret = array();
- $debugging = get_config('system','debugging');
- if($debugging)
- file_put_contents('salmon.out', "\n" . 'Fetch key' . "\n", FILE_APPEND);
+ logger('Fetching salmon key');
$arr = lrdd($uri);
@@ -62,8 +60,8 @@ function get_salmon_key($uri,$keyhash) {
}
}
- if($debugging)
- file_put_contents('salmon.out', "\n" . 'Key located: ' . print_r($ret,true) . "\n", FILE_APPEND);
+
+ logger('Key located: ' . print_r($ret,true));
if(count($ret) == 1) {
@@ -90,6 +88,7 @@ function get_salmon_key($uri,$keyhash) {
function slapper($owner,$contact,$slap) {
+ logger('slapper called. Data: ' . $slap);
// does contact have a salmon endpoint?
@@ -180,7 +179,7 @@ EOT;
$return_code = trim($a->get_curl_code());
}
-
+ logger('slapper returned ' . $return_code);
return;
}