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 (backported from 969aba2) (#75)
  • Loading branch information
shavounet authored Sep 6, 2022
1 parent 2cd0dfc commit 2b21b60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function loadRequestListener(ContainerBuilder $container)
->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 @@ -5,6 +5,7 @@
use Psr\Log\LoggerInterface;
use M6Web\Bundle\LogBridgeBundle\Matcher\MatcherInterface;
use M6Web\Bundle\LogBridgeBundle\Formatter\FormatterInterface;
use Symfony\Component\HttpKernel\Event\TerminateEvent;

/**
* LogRequestListener
Expand Down Expand Up @@ -43,7 +44,7 @@ public function __construct(FormatterInterface $contentFormatter)
/**
* onKernelTerminate
*
* @param FilterResponseEvent $event Event
* @param TerminateEvent $event Event
*/
public function onKernelTerminate($event)
{
Expand Down

0 comments on commit 2b21b60

Please sign in to comment.