protected function logError($message, $severity = 0, $name = '')
    {
        if ('' == $name) {
            $this->error[] = $message;
        } else {
            $this->error[$name] = $message;
        }
        if ($severity > 0) {
            $this->logger->log($severity, $message);
        }
    }