Log: when PHP cli-server is running, log on console
This commit is contained in:
parent
b679783fb8
commit
21b425e32b
1 changed files with 3 additions and 3 deletions
|
@ -198,10 +198,10 @@ class Log {
|
||||||
$msg[] = $message;
|
$msg[] = $message;
|
||||||
$msg = implode(' - ', $msg)."\n";
|
$msg = implode(' - ', $msg)."\n";
|
||||||
}
|
}
|
||||||
if (self :: $file_fd)
|
if (!self :: $file_fd || php_sapi_name() == 'cli-server')
|
||||||
|
error_log(rtrim($msg, "\n"));
|
||||||
|
else
|
||||||
fwrite(self :: $file_fd, $msg);
|
fwrite(self :: $file_fd, $msg);
|
||||||
elseif (self :: $error_log_fallback)
|
|
||||||
error_log($msg);
|
|
||||||
|
|
||||||
if ($level == 'FATAL')
|
if ($level == 'FATAL')
|
||||||
if (!is_null(self :: $fatal_error_handler))
|
if (!is_null(self :: $fatal_error_handler))
|
||||||
|
|
Loading…
Reference in a new issue