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:
parent
776a894487
commit
2bb729d60b
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user