Skip to content

Commit

Permalink
fix(log): avoid duplicated log where there is a subrequest by listeni…
Browse files Browse the repository at this point in the history
…ng to kernel.terminate (#74)
  • Loading branch information
shavounet committed Sep 6, 2022
1 parent b09bc7b commit f169f8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function loadRequestListener(ContainerBuilder $container): void
->addTag(
'kernel.event_listener',
[
'event' => 'kernel.response',
'event' => 'kernel.terminate',
'method' => 'onKernelTerminate',
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use M6Web\Bundle\LogBridgeBundle\Formatter\FormatterInterface;
use M6Web\Bundle\LogBridgeBundle\Matcher\MatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\Event\TerminateEvent;

/**
* LogRequestListener
Expand All @@ -22,7 +22,7 @@ public function __construct(protected FormatterInterface $contentFormatter)
{
}

public function onKernelTerminate(ResponseEvent $event): void
public function onKernelTerminate(TerminateEvent $event): void
{
if ($this->matcher === null) {
return;
Expand Down

0 comments on commit f169f8c

Please sign in to comment.