diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-26 22:09:13 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-26 22:09:13 -0700 |
commit | 2028e1695c82685102a7eef7f75094267446a887 (patch) | |
tree | 45101cd992941eaf90f3844b49e4cf90fbb8e599 /mod/pubsub.php | |
parent | eb5e6aae7273fef06a06f983fe78aaad737aa729 (diff) | |
download | volse-hubzilla-2028e1695c82685102a7eef7f75094267446a887.tar.gz volse-hubzilla-2028e1695c82685102a7eef7f75094267446a887.tar.bz2 volse-hubzilla-2028e1695c82685102a7eef7f75094267446a887.zip |
rework the logging interface
Diffstat (limited to 'mod/pubsub.php')
-rw-r--r-- | mod/pubsub.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mod/pubsub.php b/mod/pubsub.php index 1b69cc5f9..28e8356eb 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -39,10 +39,7 @@ function pubsub_init(&$a) { $hub_lease = notags(trim($_GET['hub_lease_seconds'])); $hub_verify = notags(trim($_GET['hub_verify_token'])); - $debugging = get_config('system','debugging'); - if($debugging) { - file_put_contents('pubsub.out', 'Pubsubhubbub subscription called from ' . $_SERVER['REMOTE_ADDR'] . ' at ' . datetime_convert() . "\n" . print_r($_GET,true), FILE_APPEND); - } + logger('pubsub: Subscription from' . $_SERVER['REMOTE_ADDR'] . print_r($_GET,true)); $subscribe = (($hub_mode === 'subscribe') ? 1 : 0); @@ -89,10 +86,7 @@ function pubsub_post(&$a) { $xml = file_get_contents('php://input'); - $debugging = get_config('system','debugging'); - $remote_host = 'Pubsub feed arrived from ' . $_SERVER['REMOTE_ADDR'] . ' at ' . datetime_convert() . ' for ' . $a->cmd . "\n\n"; - if($debugging) - file_put_contents('pubsub.out', $remote_host . $xml, FILE_APPEND); + logger('pubsub: feed arrived from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $a->cmd . ':' . $xml); $nick = (($a->argc > 1) ? notags(trim($a->argv[1])) : ''); $contact_id = (($a->argc > 2) ? intval($a->argv[2]) : 0); |