public function connect()
    {
        if ($this->_mongo) {
            return $this->_mongo;
        }

        if ($this->logger() && $this->logQueries()) {
            $logger = $this->buildStreamContext();
        } else {
            $logger = [];
        }

        $this->_mongo = Monga::connection($this->dns(), $this->getMongoConfig(), $logger);
        $this->_connected = true;
        return $this->_mongo;
    }