mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 01:52:18 +01:00
Modified log messages.
- avoid doing what is already handled by the Log class. - the log name is appended automatically, so don't append it again in the invocation. i.e. "ykval-verify" - the log level name is also appended automatically, so don't append it manually, especially when it doesn't match the log priority! i.e. LOG_WARNING -> ":notice:" - fix whitespace in some messages.
This commit is contained in:
parent
2df72604ed
commit
ad167cd38a
@ -109,7 +109,7 @@ foreach (array('modified','yk_counter', 'yk_use', 'yk_high', 'yk_low') as $param
|
||||
if ($syncParams[$param] !== '' && ctype_digit($syncParams[$param]))
|
||||
continue;
|
||||
|
||||
$myLog->log(LOG_NOTICE, "Input parameters $param not correct");
|
||||
$myLog->log(LOG_NOTICE, "Input parameters $param not correct");
|
||||
sendResp(S_MISSING_PARAMETER, $myLog);
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ if ($sync->countersEqual($localParams, $syncParams))
|
||||
|
||||
if ($syncParams['nonce'] != $localParams['nonce'])
|
||||
{
|
||||
$myLog->log(LOG_WARNING, 'Remote server has received a request to validate an already validated OTP ');
|
||||
$myLog->log(LOG_WARNING, 'Remote server has received a request to validate an already validated OTP');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -371,7 +371,7 @@ if (!$sync->updateDbCounters($otpParams))
|
||||
|
||||
if (!$sync->queue($otpParams, $localParams))
|
||||
{
|
||||
$myLog->log(LOG_CRIT, 'ykval-verify:critical:failed to queue sync requests');
|
||||
$myLog->log(LOG_CRIT, 'failed to queue sync requests');
|
||||
sendResp(S_BACKEND_ERROR, $myLog, $apiKey);
|
||||
}
|
||||
|
||||
@ -392,7 +392,7 @@ else
|
||||
$sl_success_rate = 0;
|
||||
}
|
||||
|
||||
$myLog->log(LOG_INFO, "ykval-verify:notice:synclevel=" . $sl .
|
||||
$myLog->log(LOG_INFO, "synclevel=" . $sl .
|
||||
" nr servers=" . $nr_servers .
|
||||
" req answers=" . $req_answers .
|
||||
" answers=" . $nr_answers .
|
||||
@ -405,7 +405,7 @@ if ($syncres == False)
|
||||
/* sync returned false, indicating that
|
||||
either at least 1 answer marked OTP as invalid or
|
||||
there were not enough answers */
|
||||
$myLog->log(LOG_WARNING, 'ykval-verify:notice:Sync failed');
|
||||
$myLog->log(LOG_WARNING, 'Sync failed');
|
||||
|
||||
if ($nr_valid_answers != $nr_answers)
|
||||
sendResp(S_REPLAYED_OTP, $myLog, $apiKey, $extra);
|
||||
|
Loading…
x
Reference in New Issue
Block a user