mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-08 03:54:20 +01:00
Modify log write.
- Log::log() internally support array implode, so no need to duplicate functionality. - however, the internal implode uses two consecutive spaces as separator, so this will change the log format slightly. e.g. "delta=x now=y" becomes "delta=x now=y"
This commit is contained in:
parent
c05a505b9c
commit
342ceac544
@ -444,7 +444,7 @@ if ($sessionCounter == $seenSessionCounter && $sessionUse > $seenSessionUse)
|
||||
$percent = 1;
|
||||
}
|
||||
|
||||
$data = array(
|
||||
$myLog->log(LOG_INFO, 'Timestamp', array(
|
||||
'seen' => $seenTs,
|
||||
'this' => $ts,
|
||||
'delta' => $tsDiff,
|
||||
@ -453,11 +453,7 @@ if ($sessionCounter == $seenSessionCounter && $sessionUse > $seenSessionUse)
|
||||
'now' => sprintf('%s (%s)'. $now, strftime('%Y-%m-%d %H:%M:%S', $now)),
|
||||
'elapsed' => $elapsed,
|
||||
'deviation' => sprintf('%s secs or %s%%', $deviation, round(100 * $percent)),
|
||||
);
|
||||
$msg = 'Timestamp';
|
||||
foreach ($data as $k => $v) $msg .= " $k=$v";
|
||||
$myLog->log(LOG_INFO, $msg);
|
||||
unset($data, $msg);
|
||||
));
|
||||
|
||||
if ($deviation > TS_ABS_TOLERANCE && $percent > TS_REL_TOLERANCE)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user