Skip to content

Commit

Permalink
Ensure alwaysFlushAfterMs interval is reset after every flush
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrHeinz committed Jun 26, 2024
1 parent 451ea78 commit 38e4016
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Monolog/LogtailHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ public function handle(array $record): bool
return $return;
}

/**
* @inheritDoc
*/
public function flush(): void
{
parent::flush();
$this->setHighResolutionTimeOfLastFlush();
}

private function setHighResolutionTimeOfLastFlush(): void
{
$currentHighResolutionTime = hrtime(true);
Expand Down

0 comments on commit 38e4016

Please sign in to comment.