Log function

implement log() function.
This commit is contained in:
Adam Magness 2018-10-29 17:20:46 -04:00
parent d6d593d724
commit 14fde5dc9b
122 changed files with 1280 additions and 1161 deletions

View file

@ -5,9 +5,10 @@
namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Core\System;
use Friendica\Util\HTTPSignature;
use Friendica\Util\Network;
@ -22,9 +23,9 @@ class Magic extends BaseModule
{
$a = self::getApp();
$ret = ['success' => false, 'url' => '', 'message' => ''];
logger('magic mdule: invoked', LOGGER_DEBUG);
Logger::log('magic mdule: invoked', LOGGER_DEBUG);
logger('args: ' . print_r($_REQUEST, true), LOGGER_DATA);
Logger::log('args: ' . print_r($_REQUEST, true), LOGGER_DATA);
$addr = ((x($_REQUEST, 'addr')) ? $_REQUEST['addr'] : '');
$dest = ((x($_REQUEST, 'dest')) ? $_REQUEST['dest'] : '');
@ -41,7 +42,7 @@ class Magic extends BaseModule
}
if (!$cid) {
logger('No contact record found: ' . print_r($_REQUEST, true), LOGGER_DEBUG);
Logger::log('No contact record found: ' . print_r($_REQUEST, true), LOGGER_DEBUG);
// @TODO Finding a more elegant possibility to redirect to either internal or external URL
$a->redirect($dest);
}
@ -55,7 +56,7 @@ class Magic extends BaseModule
return $ret;
}
logger('Contact is already authenticated', LOGGER_DEBUG);
Logger::log('Contact is already authenticated', LOGGER_DEBUG);
System::externalRedirect($dest);
}