Skip to content

Commit 0d0a8ab

Browse files
committed
TASK: Configure log messages
Set the log severity of some messages Remove the logging of very proccessed node as this leads to huge log files and covers potential errors when indexing a large amount of nodes
1 parent bb0c227 commit 0d0a8ab

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Classes/IndexingJob.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,18 @@ public function execute(QueueInterface $queue, Message $message)
4444

4545
// Skip this iteration if the node can not be fetched from the current context
4646
if (!$currentNode instanceof NodeInterface) {
47-
$this->log(sprintf('action=indexing step=failed node=%s message="Node could not be processed"', $node['identifier']));
47+
$this->log(sprintf('action=indexing step=failed node=%s message="Node could not be processed"', $node['identifier']), \LOG_WARNING);
4848
continue;
4949
}
5050

5151
$this->nodeIndexer->setIndexNamePostfix($this->indexPostfix);
52-
$this->log(sprintf('action=indexing step=started node=%s', $currentNode->getIdentifier()));
53-
5452
$this->nodeIndexer->indexNode($currentNode, $this->targetWorkspaceName);
5553
}
5654

5755
$this->nodeIndexer->flush();
5856
$duration = microtime(true) - $startTime;
5957
$rate = $numberOfNodes / $duration;
60-
$this->log(sprintf('action=indexing step=finished number_of_nodes=%d duration=%f nodes_per_second=%f', $numberOfNodes, $duration, $rate));
58+
$this->log(sprintf('action=indexing step=finished number_of_nodes=%d duration=%f nodes_per_second=%f', $numberOfNodes, $duration, $rate), \LOG_INFO);
6159
});
6260

6361
return true;

0 commit comments

Comments
 (0)