protected function log(Item $item, array $itemDocuments, ResponseAdapter $response)
    {
        if (!$this->loggingEnabled) {
            return;
        }

        $message = 'Index Queue indexing ' . $item->getType() . ':' . $item->getRecordUid() . ' - ';

        // preparing data
        $documents = [];
        foreach ($itemDocuments as $document) {
            $documents[] = (array)$document;
        }

        $logData = ['item' => (array)$item, 'documents' => $documents, 'response' => (array)$response];

        if ($response->getHttpStatus() == 200) {
            $severity = SolrLogManager::NOTICE;
            $message .= 'Success';
        } else {
            $severity = SolrLogManager::ERROR;
            $message .= 'Failure';

            $logData['status'] = $response->getHttpStatus();
            $logData['status message'] = $response->getHttpStatusMessage();
        }

        $this->logger->log($severity, $message, $logData);
    }
protected function log(Item $item, array $itemDocuments, ResponseAdapter $response)
    {
        if (!$this->loggingEnabled) {
            return;
        }

        $message = 'Index Queue indexing ' . $item->getType() . ':' . $item->getRecordUid() . ' - ';

        // preparing data
        $documents = [];
        foreach ($itemDocuments as $document) {
            $documents[] = (array)$document;
        }

        $logData = ['item' => (array)$item, 'documents' => $documents, 'response' => (array)$response];

        if ($response->getHttpStatus() == 200) {
            $severity = SolrLogManager::NOTICE;
            $message .= 'Success';
        } else {
            $severity = SolrLogManager::ERROR;
            $message .= 'Failure';

            $logData['status'] = $response->getHttpStatus();
            $logData['status message'] = $response->getHttpStatusMessage();
        }

        $this->logger->log($severity, $message, $logData);
    }
protected function log ( Item $ item , array $ itemDocuments , ResponseAdapter $ response ) { if ( ! $ this -> loggingEnabled ) { return ; } $ message = 'Index Queue indexing ' . $ item -> getType ( ) . ':' . $ item -> getRecordUid ( ) . ' - ' ; // preparing data $ documents = [ ] ; foreach ( $ itemDocuments as $ document ) { $ documents [ ] = ( array ) $ document ; } $ logData = [ 'item' => ( array ) $ item , 'documents' => $ documents , 'response' => ( array ) $ response ] ; if ( $ response -> getHttpStatus ( ) == 200 ) { $ severity = SolrLogManager :: NOTICE ; $ message .= 'Success' ; } else { $ severity = SolrLogManager :: ERROR ; $ message .= 'Failure' ; $ logData [ 'status' ] = $ response -> getHttpStatus ( ) ; $ logData [ 'status message' ] = $ response -> getHttpStatusMessage ( ) ; } $ this -> logger -> log ( $ severity , $ message , $ logData ) ; }
Logs the item and what document was created from it

@param Item $item The item that is being indexed.
@param array $itemDocuments An array of Solr documents created from the item's data
@param ResponseAdapter $response The Solr response for the particular index document
Logs the item and what document was created from it