From 693d8cdff1cd061a63891d175fb9fdc5a894ea63 Mon Sep 17 00:00:00 2001 From: Matteo Giaccone Date: Mon, 7 Aug 2017 13:51:38 +0200 Subject: [PATCH] Rollbar updated to 1.3.1 (#9) --- RollbarErrorHandler.php | 2 +- RollbarLogRoute.php | 6 ++++-- composer.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RollbarErrorHandler.php b/RollbarErrorHandler.php index 21bd837..51c223b 100644 --- a/RollbarErrorHandler.php +++ b/RollbarErrorHandler.php @@ -7,7 +7,7 @@ class RollbarErrorHandler extends CErrorHandler { protected function handleException($exception) { - Rollbar::log(Level::error(), $exception); + Rollbar::log(Level::ERROR, $exception); parent::handleException($exception); } diff --git a/RollbarLogRoute.php b/RollbarLogRoute.php index c72ff88..bdcc2f0 100644 --- a/RollbarLogRoute.php +++ b/RollbarLogRoute.php @@ -1,17 +1,19 @@ getComponent($this->rollbarComponentName) === null) { throw new CException('Rollbar component is not loaded.'); } + $this->levelFactory = new LevelFactory(); } protected function processLogs($logs) @@ -19,7 +21,7 @@ protected function processLogs($logs) foreach ($logs as $log) { // Exclude records by the exceptions handler. RollbarErrorHandler takes care of them. if (strncmp($log[2], 'exception', 9) !== 0) { - Rollbar::log(Level::fromName($this->correspondingLevel($log[1])), $log[0]); + Rollbar::log($this->levelFactory->fromName($this->correspondingLevel($log[1])), $log[0]); } } } diff --git a/composer.json b/composer.json index 2e03ed5..787ca39 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,6 @@ ], "require": { "php": ">=5.3", - "rollbar/rollbar": "~1.1.0" + "rollbar/rollbar": "~1.3.1" } }