Skip to content

Commit 92e9dc2

Browse files
committed
cli: log to error log
1 parent cd09c19 commit 92e9dc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
if ($f3->get('logger_level') === 'NONE') {
170170
$log->pushHandler(new NullHandler());
171171
} else {
172-
$logger_destination = $f3->get('logger_destination');
172+
$logger_destination = in_array(PHP_SAPI, ['cli', 'cli-server'], true) ? 'error_log' : $f3->get('logger_destination');
173173

174174
if (strpos($logger_destination, 'file:') === 0) {
175175
$handler = new StreamHandler(substr($logger_destination, 5), $f3->get('logger_level'));

0 commit comments

Comments
 (0)