Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Fixed handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Radovan Kepák committed Mar 30, 2021
1 parent 9a19a09 commit 9e305b7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/DI/MonologExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,8 @@ protected function loadHandlers(array $config): void
$builder = $this->getContainerBuilder();

foreach ($config['handlers'] as $handlerName => $implementation) {

$builder->addDefinition($this->prefix('handler.' . $handlerName))
->setFactory($implementation)
->setAutowired(FALSE)
$serviceName = $this->loadDefinitions($builder, $handlerName, $implementation);
$builder->getDefinition($serviceName)
->addTag(self::TAG_HANDLER)
->addTag(self::TAG_PRIORITY, is_numeric($handlerName) ? $handlerName : 0);
}
Expand Down

0 comments on commit 9e305b7

Please sign in to comment.