Log function

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

View file

@ -2,6 +2,7 @@
use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA;
@ -51,7 +52,7 @@ function redir_init(App $a) {
if (!empty($a->contact['id']) && $a->contact['id'] == $cid) {
// Local user is already authenticated.
$target_url = defaults($url, $contact_url);
logger($contact['name'] . " is already authenticated. Redirecting to " . $target_url, LOGGER_DEBUG);
Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, LOGGER_DEBUG);
$a->redirect($target_url);
}
}
@ -72,7 +73,7 @@ function redir_init(App $a) {
if ($v['uid'] == $_SESSION['visitor_visiting'] && $v['cid'] == $_SESSION['visitor_id']) {
// Remote user is already authenticated.
$target_url = defaults($url, $contact_url);
logger($contact['name'] . " is already authenticated. Redirecting to " . $target_url, LOGGER_DEBUG);
Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, LOGGER_DEBUG);
$a->redirect($target_url);
}
}
@ -98,7 +99,7 @@ function redir_init(App $a) {
'sec' => $sec, 'expire' => time() + 45];
DBA::insert('profile_check', $fields);
logger('mod_redir: ' . $contact['name'] . ' ' . $sec, LOGGER_DEBUG);
Logger::log('mod_redir: ' . $contact['name'] . ' ' . $sec, LOGGER_DEBUG);
$dest = (!empty($url) ? '&destination_url=' . $url : '');
@ -120,7 +121,7 @@ function redir_init(App $a) {
$url .= $separator . 'zrl=' . urlencode($my_profile);
}
logger('redirecting to ' . $url, LOGGER_DEBUG);
Logger::log('redirecting to ' . $url, LOGGER_DEBUG);
$a->redirect($url);
}