1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-02-24 06:52:34 +01:00

Flush roll bar notifier on close rather than destruct.

Inherit DocBlocks.
This commit is contained in:
Paul Statezny 2014-03-06 11:42:52 -07:00
parent 776a894487
commit 2bb729d60b

View File

@ -31,6 +31,9 @@ class RollbarHandler extends AbstractProcessingHandler
parent::__construct($level, $bubble);
}
/**
* {@inheritdoc}
*/
protected function write(array $record)
{
if (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) {
@ -44,7 +47,10 @@ class RollbarHandler extends AbstractProcessingHandler
}
}
public function __destruct()
/**
* {@inheritdoc}
*/
public function close()
{
$this->rollbarNotifier->flush();
}