summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/remotesubscribe.php4
-rw-r--r--lib/util.php18
2 files changed, 21 insertions, 1 deletions
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php
index 8f9dd3cb9..e225fb683 100644
--- a/actions/remotesubscribe.php
+++ b/actions/remotesubscribe.php
@@ -77,7 +77,9 @@ class RemotesubscribeAction extends Action {
$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
$yadis = Auth_Yadis_Yadis::discover($profile, $fetcher);
-
+
+ common_debug('remotesubscribe.php: XRDS discovery result: "'.print_r($yadis, TRUE) .'"');
+
if (!$yadis || $yadis->fail) {
$this->show_form(_t('Not a valid profile URL (no YADIS document).'));
return;
diff --git a/lib/util.php b/lib/util.php
index 126801126..d9171c743 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -553,3 +553,21 @@ function common_timestamp() {
function _t($str) {
return $str;
}
+
+function common_ensure_syslog() {
+ static $initialized = false;
+ if (!$initialized) {
+ define_syslog_variables();
+ openlog("laconica", LOG_PID, LOG_USER);
+ $initialized = true;
+ }
+}
+
+function common_log($priority, $msg) {
+ common_ensure_syslog();
+ syslog($priority, $msg);
+}
+
+function common_debug($msg) {
+ common_log(LOG_DEBUG, $msg);
+} \ No newline at end of file