Skip to content

Commit

Permalink
feat: do not filter out LoggerChain in LoggerChain
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Oct 16, 2023
1 parent 69655c9 commit adea8b7
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/Logger/LoggerChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,11 @@

namespace SimPod\ClickHouseClient\Logger;

use function array_filter;

final class LoggerChain implements SqlLogger
{
/** @var SqlLogger[] */
private array $loggers;

/** @param SqlLogger[] $loggers */
public function __construct(array $loggers = [])
public function __construct(private array $loggers = [])
{
$this->loggers = array_filter(
$loggers,
static fn (SqlLogger $logger): bool => ! $logger instanceof self,
);
}

public function startQuery(string $id, string $sql): void
Expand Down

0 comments on commit adea8b7

Please sign in to comment.