/** * @param Event $event */ public function onSolrUpdate(Event $event) { $metaInformation = $event->getMetaInformation(); $nameWithId = $this->createDocumentNameWithId($metaInformation); $fieldList = $this->createFieldList($metaInformation); $this->logger->debug(sprintf('document %s with fields %s was updated', $nameWithId, $fieldList)); }
/** * (non-PHPdoc) * @see \FS\SolrBundle\Event\EventListenerInterface::notify() */ public function notify(Event $event) { $metaInformation = $event->getMetaInformation(); $nameWithId = $this->createDocumentNameWithId($metaInformation); $fieldList = $this->createFieldList($metaInformation); $this->logger->debug(sprintf('use path %s, document %s with fields %s was updated', $event->getCore(), $nameWithId, $fieldList)); }
/** * @param Event $event * * @return string */ private function getMessage(Event $event) { if (!$event instanceof ErrorEvent) { return ''; } return $event->getExceptionMessage(); }
/** (non-PHPdoc) * @see \FS\SolrBundle\Event\EventListenerInterface::notify() */ public function notify(Event $event) { $exceptionMessage = ''; if ($event instanceof ErrorEvent) { $exceptionMessage = $event->getExceptionMessage(); } $this->logger->debug(sprintf('the error "%s" occure while executing event %s', $exceptionMessage, $event->getSolrAction())); }
/** * @param Event $event */ public function onSolrError(Event $event) { $exceptionMessage = ''; if ($event instanceof ErrorEvent) { $exceptionMessage = $event->getExceptionMessage(); } $this->logger->error(sprintf('the error "%s" occure while executing event %s', $exceptionMessage, $event->getSolrAction())); if ($event->hasSourceEvent()) { $event->getSourceEvent()->stopPropagation(); } }