X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdebug%2Flogger%2Fmonolog%2FKafkaHandler.php;h=ef447d150a5d9f1e0b780347c8d1f735aba601e7;hb=b7131c89e9ad0d69beb5373df794e3d63e3c5cb6;hp=6670fe932d37024c9c642e4cf81a2cdabe787de7;hpb=cbac334f116c6546c422a67ce99d2a56eb792d30;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/debug/logger/monolog/KafkaHandler.php b/includes/debug/logger/monolog/KafkaHandler.php index 6670fe932d..ef447d150a 100644 --- a/includes/debug/logger/monolog/KafkaHandler.php +++ b/includes/debug/logger/monolog/KafkaHandler.php @@ -128,7 +128,7 @@ class KafkaHandler extends AbstractProcessingHandler { } /** - * {@inheritDoc} + * @inheritDoc */ protected function write( array $record ) { if ( $record['formatted'] !== null ) { @@ -138,7 +138,7 @@ class KafkaHandler extends AbstractProcessingHandler { } /** - * {@inheritDoc} + * @inheritDoc */ public function handleBatch( array $batch ) { $channels = []; @@ -254,11 +254,7 @@ class KafkaHandler extends AbstractProcessingHandler { * @param array $records List of records to append */ protected function addMessages( $channel, array $records ) { - if ( isset( $this->options['alias'][$channel] ) ) { - $topic = $this->options['alias'][$channel]; - } else { - $topic = "monolog_$channel"; - } + $topic = $this->options['alias'][$channel] ?? "monolog_$channel"; $partition = $this->getRandomPartition( $topic ); if ( $partition !== null ) { $this->produce->setMessages( $topic, $partition, $records );