src/log/Logger.php
private static function invokeErrorLogHandler($loggable, $level, array &$context) {
        if (!key_exists('cliMessage', $context))
            self::composeCliMessage($loggable, $level, $context);

        $msg = 'PHP '.$context['cliMessage'];
        if (key_exists('cliExtra', $context))
            $msg .= $context['cliExtra'];
        $msg = str_replace(chr(0), '?', $msg);                   // replace NUL bytes which mess up the logfile

        if (CLI && empty(ini_get('error_log'))) {
            // Suppress duplicated output to STDERR, the PrintHandler already wrote to STDOUT.

            // TODO: Instead of messing around here the PrintHandler must not print to STDOUT if the ErrorLogHandler
            //       is active and prints to STDERR.
            // TODO: Suppress output to STDERR in interactive terminals only (i.e. not in CRON).
        }
        else {
            error_log(trim($msg), ERROR_LOG_DEFAULT);
        }
    }
private static function invokeErrorLogHandler($loggable, $level, array &$context) {
        if (!key_exists('cliMessage', $context))
            self::composeCliMessage($loggable, $level, $context);

        $msg = 'PHP '.$context['cliMessage'];
        if (key_exists('cliExtra', $context))
            $msg .= $context['cliExtra'];
        $msg = str_replace(chr(0), '?', $msg);                   // replace NUL bytes which mess up the logfile

        if (CLI && empty(ini_get('error_log'))) {
            // Suppress duplicated output to STDERR, the PrintHandler already wrote to STDOUT.

            // TODO: Instead of messing around here the PrintHandler must not print to STDOUT if the ErrorLogHandler
            //       is active and prints to STDERR.
            // TODO: Suppress output to STDERR in interactive terminals only (i.e. not in CRON).
        }
        else {
            error_log(trim($msg), ERROR_LOG_DEFAULT);
        }
    }
private static function invokeErrorLogHandler ( $ loggable , $ level , array & $ context ) { if ( ! key_exists ( 'cliMessage' , $ context ) ) self :: composeCliMessage ( $ loggable , $ level , $ context ) ; $ msg = 'PHP ' . $ context [ 'cliMessage' ] ; if ( key_exists ( 'cliExtra' , $ context ) ) $ msg .= $ context [ 'cliExtra' ] ; $ msg = str_replace ( chr ( 0 ) , '?' , $ msg ) ; // replace NUL bytes which mess up the logfile if ( CLI && empty ( ini_get ( 'error_log' ) ) ) { // Suppress duplicated output to STDERR, the PrintHandler already wrote to STDOUT. // TODO: Instead of messing around here the PrintHandler must not print to STDOUT if the ErrorLogHandler //       is active and prints to STDERR. // TODO: Suppress output to STDERR in interactive terminals only (i.e. not in CRON). } else { error_log ( trim ( $ msg ) , ERROR_LOG_DEFAULT ) ; } }
Pass the message to the PHP default error log mechanism as defined by the PHP configuration value "error_log".

ini_get('error_log')

Name of the file where script errors should be logged. If the special value "syslog" is used, errors are sent to the
system logger instead. On Unix, this means syslog(3) and on Windows it means the event log. If this directive is not
set, errors are sent to the SAPI error logger. For example, it is an error log in Apache or STDERR in CLI mode.

@param  string|\Exception $loggable - message or exception to log
@param  int               $level    - loglevel of the loggable
@param  array             $context  - reference to the log context with additional data
Pass the message to the PHP default error log mechanism as defined by the PHP configuration value error_log .