protected function phpErrorLevel($level) {
        switch ($level) {
            case E_NOTICE:
            case E_USER_NOTICE:
            case E_STRICT:
            case E_DEPRECATED:
            case E_USER_DEPRECATED:
                return LogLevel::NOTICE;

            case E_WARNING:
            case E_USER_WARNING:
            case E_COMPILE_WARNING:
            case E_CORE_WARNING:
                return LogLevel::WARNING;

            case E_ERROR:
            case E_USER_ERROR:
            case E_PARSE:
            case E_COMPILE_ERROR:
            case E_CORE_ERROR:
            case E_RECOVERABLE_ERROR:
                return LogLevel::ERROR;
        }

        return LogLevel::ERROR;
    }