mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 09:36:11 +02:00
CS fixes
This commit is contained in:
@@ -40,7 +40,7 @@ class RollbarHandler extends AbstractProcessingHandler
|
||||
*/
|
||||
protected $rollbarNotifier;
|
||||
|
||||
protected $levelMap = array(
|
||||
protected $levelMap = [
|
||||
Logger::DEBUG => 'debug',
|
||||
Logger::INFO => 'info',
|
||||
Logger::NOTICE => 'info',
|
||||
@@ -49,7 +49,7 @@ class RollbarHandler extends AbstractProcessingHandler
|
||||
Logger::CRITICAL => 'critical',
|
||||
Logger::ALERT => 'critical',
|
||||
Logger::EMERGENCY => 'critical',
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* Records whether any log records have been added since the last flush of the rollbar notifier
|
||||
@@ -76,17 +76,17 @@ class RollbarHandler extends AbstractProcessingHandler
|
||||
protected function write(array $record)
|
||||
{
|
||||
$context = $record['context'];
|
||||
$payload = array();
|
||||
$payload = [];
|
||||
if (isset($context['payload'])) {
|
||||
$payload = $context['payload'];
|
||||
unset($context['payload']);
|
||||
}
|
||||
$context = array_merge($context, $record['extra'], array(
|
||||
$context = array_merge($context, $record['extra'], [
|
||||
'level' => $this->levelMap[$record['level']],
|
||||
'monolog_level' => $record['level_name'],
|
||||
'channel' => $record['channel'],
|
||||
'datetime' => $record['datetime']->format('U'),
|
||||
));
|
||||
]);
|
||||
|
||||
if (isset($context['exception']) && $context['exception'] instanceof Exception) {
|
||||
$exception = $context['exception'];
|
||||
|
Reference in New Issue
Block a user