src/ErrorHandler.php
public function PHPErrorHandler($error_level, $error_message, $error_file, $error_line, $error_context)
    {
        $message = $error_message . ' | File: {file} | Ln: {line}';
        $context = array(
            'file' => $error_file,
            'line' => $error_line
        );

        switch ($error_level) {
            case E_USER_ERROR:
                // no break
            case E_RECOVERABLE_ERROR:
                $this->logger->error($message, $context);
                break;
            case E_WARNING:
                // no break
            case E_USER_WARNING:
                $this->logger->warning($message, $context);
                break;
            case E_NOTICE:
                // no break
            case E_USER_NOTICE:
                $this->logger->notice($message, $context);
                break;
            case E_STRICT:
                $this->logger->debug($message, $context);
                break;
            default:
                $this->logger->warning($message, $context);
        }
        return;
    }
public function PHPErrorHandler($error_level, $error_message, $error_file, $error_line, $error_context)
    {
        $message = $error_message . ' | File: {file} | Ln: {line}';
        $context = array(
            'file' => $error_file,
            'line' => $error_line
        );

        switch ($error_level) {
            case E_USER_ERROR:
                // no break
            case E_RECOVERABLE_ERROR:
                $this->logger->error($message, $context);
                break;
            case E_WARNING:
                // no break
            case E_USER_WARNING:
                $this->logger->warning($message, $context);
                break;
            case E_NOTICE:
                // no break
            case E_USER_NOTICE:
                $this->logger->notice($message, $context);
                break;
            case E_STRICT:
                $this->logger->debug($message, $context);
                break;
            default:
                $this->logger->warning($message, $context);
        }
        return;
    }
public function PHPErrorHandler ( $ error_level , $ error_message , $ error_file , $ error_line , $ error_context ) { $ message = $ error_message . ' | File: {file} | Ln: {line}' ; $ context = array ( 'file' => $ error_file , 'line' => $ error_line ) ; switch ( $ error_level ) { case E_USER_ERROR : // no break case E_RECOVERABLE_ERROR : $ this -> logger -> error ( $ message , $ context ) ; break ; case E_WARNING : // no break case E_USER_WARNING : $ this -> logger -> warning ( $ message , $ context ) ; break ; case E_NOTICE : // no break case E_USER_NOTICE : $ this -> logger -> notice ( $ message , $ context ) ; break ; case E_STRICT : $ this -> logger -> debug ( $ message , $ context ) ; break ; default : $ this -> logger -> warning ( $ message , $ context ) ; } return ; }
Logger provided error handler
Logger provided error handler