private function getLevel(Throwable $exception): string
    {
        foreach ($this->resolvedOptions['levels'] as $class => $level) {
            if ($exception instanceof $class) {
                return $level;
            }
        }

        if ($exception instanceof FatalErrorException) {
            return self::$loggers[$exception->getSeverity()];
        }

        return LogLevel::ERROR;
    }