Skip to content

Commit a117950

Browse files
committed
use logger from init params if present
1 parent 2acb854 commit a117950

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Options.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,12 @@ private function validateContextLinesOption(?int $contextLines): bool
11771177
*/
11781178
private function resolveWithLogger(array $options = []): array
11791179
{
1180-
return $this->resolver->resolve($options, $this->getLoggerOrNullLogger());
1180+
/**
1181+
* @var LoggerInterface $logger
1182+
*/
1183+
$logger = $options['logger'] ?? $this->getLoggerOrNullLogger();
1184+
1185+
return $this->resolver->resolve($options, $logger);
11811186
}
11821187

11831188
/**

0 commit comments

Comments
 (0)