Commit 673e1981 authored by Manfred Kutas's avatar Manfred Kutas

ZP-781 Use comma as decimal and dot as thousand separators, add 's' as

unit for time usage. 

Released under the Affero GNU General Public License (AGPL) version 3.
parent ab4f7cb5
...@@ -140,15 +140,15 @@ class ZLog { ...@@ -140,15 +140,15 @@ class ZLog {
static public function WriteEnd() { static public function WriteEnd() {
if (LOGLEVEL_DEBUG <= LOGLEVEL || (LOGLEVEL_DEBUG <= LOGUSERLEVEL && self::$userLog)) { if (LOGLEVEL_DEBUG <= LOGLEVEL || (LOGLEVEL_DEBUG <= LOGUSERLEVEL && self::$userLog)) {
if (version_compare(phpversion(), '5.4.0') < 0) { if (version_compare(phpversion(), '5.4.0') < 0) {
$time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 4); $time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 2, ',', '.');
} }
else { else {
$time_used = number_format(microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"], 4); $time_used = number_format(microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"], 2, ',', '.');
} }
$peakUsage = memory_get_peak_usage(false); $peakUsage = memory_get_peak_usage(false);
$truePeakUsage = memory_get_peak_usage(true); $truePeakUsage = memory_get_peak_usage(true);
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Memory usage information: %s/%s (%s B/%s B) - Execution time: %s - HTTP responde code: %s", ZLog::Write(LOGLEVEL_DEBUG, sprintf("Memory usage information: %s/%s (%s B/%s B) - Execution time: %ss - HTTP responde code: %s",
Utils::FormatBytes($peakUsage), Utils::FormatBytes($truePeakUsage), $peakUsage, $truePeakUsage, $time_used, http_response_code())); Utils::FormatBytes($peakUsage), Utils::FormatBytes($truePeakUsage), $peakUsage, $truePeakUsage, $time_used, http_response_code()));
ZLog::Write(LOGLEVEL_DEBUG, "-------- End"); ZLog::Write(LOGLEVEL_DEBUG, "-------- End");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment