LSlog_console: fix stderr switching on message other than INFO / DEBUG

This commit is contained in:
Benjamin Renard 2020-07-06 10:21:44 +02:00
parent 5696eb99c4
commit c232a9899d

View file

@ -55,7 +55,7 @@ class LSlog_console extends LSlog_handler {
**/
public function logging($level, $message, $logger=null) {
return fwrite(
($level > 1?$this -> stderr:$this -> stdout),
(in_array($level, array('INFO', 'DEBUG'))?$this -> stdout:$this -> stderr),
$this -> format($level, $message, $logger)."\n"
);
}