Skip to content

Commit

Permalink
flush shared log context (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald authored May 9, 2022
1 parent 0fcec14 commit 2ead59c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Listeners/FlushLogContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ public function handle($event): void
return;
}

if (method_exists($event->sandbox['log'], 'flushSharedContext')) {
$event->sandbox['log']->flushSharedContext();
}

if (method_exists($event->sandbox['log']->driver(), 'withoutContext')) {
$event->sandbox['log']->withoutContext();
}
Expand Down

0 comments on commit 2ead59c

Please sign in to comment.