protected function logErrorsForDescriptor(FileDescriptor $fileDescriptor)
    {
        $errors = $fileDescriptor->getAllErrors();

        /** @var Error $error */
        foreach ($errors as $error) {
            $this->log($error->getCode(), $error->getSeverity(), $error->getContext());
        }
    }