/** * logging. * * @deprecated Overwriting Client->_log is deprecated. Handle logging functionality by using a custom LoggerInterface. * * @param mixed $context */ protected function _log($context) { if ($context instanceof ConnectionException) { $this->_logger->error('Elastica Request Failure', ['exception' => $context, 'request' => $context->getRequest()->toArray(), 'retry' => $this->hasConnection()]); return; } if ($context instanceof Request) { $this->_logger->debug('Elastica Request', ['request' => $context->toArray(), 'response' => $this->_lastResponse ? $this->_lastResponse->getData() : null, 'responseStatus' => $this->_lastResponse ? $this->_lastResponse->getStatus() : null]); return; } $this->_logger->debug('Elastica Request', ['message' => $context]); }