diff options
Diffstat (limited to 'lib/private/log/owncloud.php')
-rw-r--r-- | lib/private/log/owncloud.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php index f8a5f7534c5..e455824a8dd 100644 --- a/lib/private/log/owncloud.php +++ b/lib/private/log/owncloud.php @@ -73,7 +73,7 @@ class OC_Log_Owncloud { } catch (Exception $e) { $timezone = new DateTimeZone('UTC'); } - $time = DateTime::createFromFormat("U.u", microtime(true), $timezone); + $time = DateTime::createFromFormat("U.u", number_format(microtime(true), 4, ".", ""), $timezone); if ($time === false) { $time = new DateTime(null, $timezone); } @@ -101,6 +101,9 @@ class OC_Log_Owncloud { // Fall back to error_log error_log($entry); } + if (php_sapi_name() === 'cli-server') { + error_log($message, 4); + } } /** |