Skip to content
Snippets Groups Projects
Commit a6f01377 authored by Olav Morken's avatar Olav Morken
Browse files

Logger: Add timestamp to captured log.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2618 44740490-163a-0410-bde0-09ae8108e29a
parent 1b2b0670
No related branches found
No related tags found
No related merge requests found
......@@ -171,7 +171,12 @@ class SimpleSAML_Logger {
}
if (self::$captureLog) self::$capturedLog[] = $string;
if (self::$captureLog) {
$ts = microtime(TRUE);
$msecs = (int)(($ts - (int)$ts) * 1000);
$ts = GMdate('H:i:s', $ts) . sprintf('.%03d', $msecs) . 'Z';
self::$capturedLog[] = $ts . ' ' . $string;
}
if (self::$logLevel >= $level || $statsLog) {
if (is_array($string)) $string = implode(",",$string);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment