protected function log($errcode, $errstr, $file = null, $line = null) {
            // @codeCoverageIgnoreStart
            switch ($errcode) {
                case E_NOTICE:
                case E_USER_NOTICE:
                case E_WARNING:
                case E_USER_WARNING:
                case E_CORE_WARNING:
                case E_DEPRECATED:
                case E_USER_DEPRECATED:
                    $method = 'warning';
                    break;
                default:
                    $method = 'error';
            }
            // @codeCoverageIgnoreEnd

            $msg = '[' . $errcode . '] ' . $errstr;

            if ($this->config->logErrorLocation && $file && $line) {
                $msg .= ' (occurred in ' . $file . ' @ line ' . $line . ')';
            }

            $this->logger->{$method}($msg);
        }