mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 06:06:40 +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);
|
parent::__construct($level, $bubble);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
protected function write(array $record)
|
protected function write(array $record)
|
||||||
{
|
{
|
||||||
if (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) {
|
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();
|
$this->rollbarNotifier->flush();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user