public function logStats($fatal, Logger $logger)
    {
        if (!$this->getErrors() && !$fatal) {
            return;
        }

        /** @var \Exception $error */
        foreach ($this->getErrors() as $error) {
            $logger->warning('  ' . $error->getMessage());
        }

        if ($fatal) {
            $logger->error('  ' . $fatal->getMessage());
        }
    }