Logger Levels

update logger levels in calls
This commit is contained in:
Adam Magness 2018-10-30 09:58:45 -04:00
parent 91ef9f238c
commit 50da89d861
86 changed files with 673 additions and 673 deletions

View file

@ -107,7 +107,7 @@ class Profile
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname, 'account_removed' => false]);
if (!DBA::isResult($user) && empty($profiledata)) {
Logger::log('profile error: ' . $a->query_string, LOGGER_DEBUG);
Logger::log('profile error: ' . $a->query_string, Logger::DEBUG);
notice(L10n::t('Requested account is not available.') . EOL);
$a->error = 404;
return;
@ -125,7 +125,7 @@ class Profile
$pdata = self::getByNickname($nickname, $user['uid'], $profile);
if (empty($pdata) && empty($profiledata)) {
Logger::log('profile error: ' . $a->query_string, LOGGER_DEBUG);
Logger::log('profile error: ' . $a->query_string, Logger::DEBUG);
notice(L10n::t('Requested profile is not available.') . EOL);
$a->error = 404;
return;
@ -1021,27 +1021,27 @@ class Profile
// Try to find the public contact entry of the visitor.
$cid = Contact::getIdForURL($my_url);
if (!$cid) {
Logger::log('No contact record found for ' . $my_url, LOGGER_DEBUG);
Logger::log('No contact record found for ' . $my_url, Logger::DEBUG);
return;
}
$contact = DBA::selectFirst('contact',['id', 'url'], ['id' => $cid]);
if (DBA::isResult($contact) && remote_user() && remote_user() == $contact['id']) {
Logger::log('The visitor ' . $my_url . ' is already authenticated', LOGGER_DEBUG);
Logger::log('The visitor ' . $my_url . ' is already authenticated', Logger::DEBUG);
return;
}
// Avoid endless loops
$cachekey = 'zrlInit:' . $my_url;
if (Cache::get($cachekey)) {
Logger::log('URL ' . $my_url . ' already tried to authenticate.', LOGGER_DEBUG);
Logger::log('URL ' . $my_url . ' already tried to authenticate.', Logger::DEBUG);
return;
} else {
Cache::set($cachekey, true, Cache::MINUTE);
}
Logger::log('Not authenticated. Invoking reverse magic-auth for ' . $my_url, LOGGER_DEBUG);
Logger::log('Not authenticated. Invoking reverse magic-auth for ' . $my_url, Logger::DEBUG);
Worker::add(PRIORITY_LOW, 'GProbe', $my_url);
@ -1062,7 +1062,7 @@ class Profile
// We have to check if the remote server does understand /magic without invoking something
$serverret = Network::curl($basepath . '/magic');
if ($serverret->isSuccess()) {
Logger::log('Doing magic auth for visitor ' . $my_url . ' to ' . $magic_path, LOGGER_DEBUG);
Logger::log('Doing magic auth for visitor ' . $my_url . ' to ' . $magic_path, Logger::DEBUG);
System::externalRedirect($magic_path);
}
}
@ -1093,7 +1093,7 @@ class Profile
// Try to find the public contact entry of the visitor.
$cid = Contact::getIdForURL($visitor_handle);
if(!$cid) {
Logger::log('owt: unable to finger ' . $visitor_handle, LOGGER_DEBUG);
Logger::log('owt: unable to finger ' . $visitor_handle, Logger::DEBUG);
return;
}
@ -1122,7 +1122,7 @@ class Profile
info(L10n::t('OpenWebAuth: %1$s welcomes %2$s', $a->getHostName(), $visitor['name']));
Logger::log('OpenWebAuth: auth success from ' . $visitor['addr'], LOGGER_DEBUG);
Logger::log('OpenWebAuth: auth success from ' . $visitor['addr'], Logger::DEBUG);
}
public static function zrl($s, $force = false)