mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 21:56:31 +02:00
Flush roll bar notifier on close rather than destruct.
Inherit DocBlocks.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user