Skip to content

Commit 2f8eec2

Browse files
authored
Update Ydb.php
1 parent c1684b7 commit 2f8eec2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Ydb.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ public function __construct($config = [], LoggerInterface $logger = null)
9191
$this->database = $config['database'] ?? null;
9292
$this->iam_config = $config['iam_config'] ?? [];
9393

94-
$this->logger = $logger;
94+
if ($logger){
95+
$this->logger = $logger;
96+
} else {
97+
$this->logger = new NullLogger();
98+
}
9599

96100
if(isset($config['credentials'])){
97101
$this->iam_config['credentials'] = $config['credentials'];

0 commit comments

Comments
 (0)