Log function
implement log() function.
This commit is contained in:
parent
d6d593d724
commit
14fde5dc9b
122 changed files with 1280 additions and 1161 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
|
|
@ -18,7 +19,7 @@ function receive_post(App $a)
|
|||
{
|
||||
$enabled = intval(Config::get('system', 'diaspora_enabled'));
|
||||
if (!$enabled) {
|
||||
logger('mod-diaspora: disabled');
|
||||
Logger::log('mod-diaspora: disabled');
|
||||
System::httpExit(500);
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +42,7 @@ function receive_post(App $a)
|
|||
|
||||
// It is an application/x-www-form-urlencoded
|
||||
|
||||
logger('mod-diaspora: receiving post', LOGGER_DEBUG);
|
||||
Logger::log('mod-diaspora: receiving post', LOGGER_DEBUG);
|
||||
|
||||
if (empty($_POST['xml'])) {
|
||||
$postdata = file_get_contents("php://input");
|
||||
|
|
@ -49,29 +50,29 @@ function receive_post(App $a)
|
|||
System::httpExit(500);
|
||||
}
|
||||
|
||||
logger('mod-diaspora: message is in the new format', LOGGER_DEBUG);
|
||||
Logger::log('mod-diaspora: message is in the new format', LOGGER_DEBUG);
|
||||
$msg = Diaspora::decodeRaw($importer, $postdata);
|
||||
} else {
|
||||
$xml = urldecode($_POST['xml']);
|
||||
|
||||
logger('mod-diaspora: decode message in the old format', LOGGER_DEBUG);
|
||||
Logger::log('mod-diaspora: decode message in the old format', LOGGER_DEBUG);
|
||||
$msg = Diaspora::decode($importer, $xml);
|
||||
|
||||
if ($public && !$msg) {
|
||||
logger('mod-diaspora: decode message in the new format', LOGGER_DEBUG);
|
||||
Logger::log('mod-diaspora: decode message in the new format', LOGGER_DEBUG);
|
||||
$msg = Diaspora::decodeRaw($importer, $xml);
|
||||
}
|
||||
}
|
||||
|
||||
logger('mod-diaspora: decoded', LOGGER_DEBUG);
|
||||
Logger::log('mod-diaspora: decoded', LOGGER_DEBUG);
|
||||
|
||||
logger('mod-diaspora: decoded msg: ' . print_r($msg, true), LOGGER_DATA);
|
||||
Logger::log('mod-diaspora: decoded msg: ' . print_r($msg, true), LOGGER_DATA);
|
||||
|
||||
if (!is_array($msg)) {
|
||||
System::httpExit(500);
|
||||
}
|
||||
|
||||
logger('mod-diaspora: dispatching', LOGGER_DEBUG);
|
||||
Logger::log('mod-diaspora: dispatching', LOGGER_DEBUG);
|
||||
|
||||
$ret = true;
|
||||
if ($public) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue