From 40f558104382cb5aa89f79b03583f707f86f24ef Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Wed, 23 Mar 2022 08:25:17 -0500 Subject: [PATCH 01/14] Fixed v2 and v4 scheduled CI checks out master branch --- .github/workflows/ci-2.x.yml | 9 ++++++++- .github/workflows/ci-4.x.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-2.x.yml b/.github/workflows/ci-2.x.yml index 6339b60..00c930c 100644 --- a/.github/workflows/ci-2.x.yml +++ b/.github/workflows/ci-2.x.yml @@ -42,8 +42,15 @@ jobs: name: Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }} (${{ matrix.os }}) runs-on: ${{ matrix.os }}-latest steps: - - name: Checkout the code + - name: Checkout the PR Branch uses: actions/checkout@v2 + if: ${{ github.event_name == 'pull_request' }} + + - name: Checkout the v2 Branch + uses: actions/checkout@v2 + # Set the branch to our version branch not master when scheduled. + ref: 'next/2.x/main' + if: ${{ github.event_name == 'schedule' }} - name: Install PHP and composer environment uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/ci-4.x.yml b/.github/workflows/ci-4.x.yml index d8235c3..7185667 100644 --- a/.github/workflows/ci-4.x.yml +++ b/.github/workflows/ci-4.x.yml @@ -42,8 +42,15 @@ jobs: name: Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }} (${{ matrix.os }}) runs-on: ${{ matrix.os }}-latest steps: - - name: Checkout the code + - name: Checkout the PR Branch uses: actions/checkout@v2 + if: ${{ github.event_name == 'pull_request' }} + + - name: Checkout the v4 Branch + uses: actions/checkout@v2 + # Set the branch to our version branch not master when scheduled. + ref: 'next/4.x/main' + if: ${{ github.event_name == 'schedule' }} - name: Install PHP and composer environment uses: shivammathur/setup-php@v2 From e9b6428cf3c85f9908cd55e4d2c64092fbc7f2c9 Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Thu, 31 Mar 2022 07:59:44 -0500 Subject: [PATCH 02/14] Fixed CI 'ref' not child of 'with' --- .github/workflows/ci-2.x.yml | 5 +++-- .github/workflows/ci-4.x.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-2.x.yml b/.github/workflows/ci-2.x.yml index 00c930c..3b1de92 100644 --- a/.github/workflows/ci-2.x.yml +++ b/.github/workflows/ci-2.x.yml @@ -48,9 +48,10 @@ jobs: - name: Checkout the v2 Branch uses: actions/checkout@v2 - # Set the branch to our version branch not master when scheduled. - ref: 'next/2.x/main' if: ${{ github.event_name == 'schedule' }} + with: + # Set the branch to our version branch not master when scheduled. + ref: 'next/2.x/main' - name: Install PHP and composer environment uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/ci-4.x.yml b/.github/workflows/ci-4.x.yml index 7185667..58892e2 100644 --- a/.github/workflows/ci-4.x.yml +++ b/.github/workflows/ci-4.x.yml @@ -48,9 +48,10 @@ jobs: - name: Checkout the v4 Branch uses: actions/checkout@v2 - # Set the branch to our version branch not master when scheduled. - ref: 'next/4.x/main' if: ${{ github.event_name == 'schedule' }} + with: + # Set the branch to our version branch not master when scheduled. + ref: 'next/4.x/main' - name: Install PHP and composer environment uses: shivammathur/setup-php@v2 From 677eafb37090b15c54ad3d7a550a4fb92584af47 Mon Sep 17 00:00:00 2001 From: Jonny Nott Date: Wed, 8 Feb 2023 10:14:31 +0000 Subject: [PATCH 03/14] add Laravel 10 support --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 600ce50..b09a042 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ ], "require": { "php": ">=7.2|^8.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", "rollbar/rollbar": "^2.0 | ^3.1" }, "require-dev": { From 1bb2c52b23a6ab3295fc6bcd5b5f549c4e9e05e8 Mon Sep 17 00:00:00 2001 From: Michael Scola Date: Wed, 15 Feb 2023 10:10:15 -0600 Subject: [PATCH 04/14] Added updates for Laravel 10 only (PHP 8.1 and illuminate/support 10) and updated the handler to use the new interface --- composer.json | 4 ++-- src/MonologHandler.php | 27 ++++++++++++++++++++------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index b09a042..fb745db 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,8 @@ } ], "require": { - "php": ">=7.2|^8.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", + "php": "^8.1", + "illuminate/support": "^10.0", "rollbar/rollbar": "^2.0 | ^3.1" }, "require-dev": { diff --git a/src/MonologHandler.php b/src/MonologHandler.php index d168199..d695dda 100644 --- a/src/MonologHandler.php +++ b/src/MonologHandler.php @@ -3,28 +3,41 @@ namespace Rollbar\Laravel; use Monolog\Handler\RollbarHandler; +use Monolog\LogRecord; class MonologHandler extends RollbarHandler { protected $app; + /** + * @param $app + * @return void + */ public function setApp($app) { $this->app = $app; } - protected function write(array $record): void + /** + * @param LogRecord $record + * @return void + */ + protected function write(LogRecord $record): void { - $record['context'] = $this->addContext($record['context']); - parent::write($record); + parent::write(new LogRecord($record->datetime, + $record->channel, + $record->level, + $record->message, + (array_merge($record->toArray(), [ 'context' => $this->addContext($record->context) ])), + $record->extra, + $record->formatted)); } /** - * Add Laravel specific information to the context. - * * @param array $context + * @return array */ - protected function addContext(array $context = []) + protected function addContext(array $context = []): array { $config = $this->rollbarLogger->extend([]); @@ -47,7 +60,7 @@ protected function addContext(array $context = []) } elseif (method_exists($data, 'getKey')) { $person['id'] = $data->getKey(); } - + if (isset($person['id'])) { if (isset($data->username)) { $person['username'] = $data->username; From f211907c0012e24d832f41bc94572633e09aeeff Mon Sep 17 00:00:00 2001 From: Michael Scola Date: Wed, 15 Feb 2023 11:07:28 -0600 Subject: [PATCH 05/14] updated minimum rollbar version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fb745db..9548389 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require": { "php": "^8.1", "illuminate/support": "^10.0", - "rollbar/rollbar": "^2.0 | ^3.1" + "rollbar/rollbar": "^3.1" }, "require-dev": { "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", From 4fc013524994b9e3dfcf7e4ed3a1f77a7c04bbb1 Mon Sep 17 00:00:00 2001 From: Michael Scola Date: Wed, 15 Feb 2023 13:53:12 -0600 Subject: [PATCH 06/14] updated bug --- src/MonologHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MonologHandler.php b/src/MonologHandler.php index d695dda..66bcd02 100644 --- a/src/MonologHandler.php +++ b/src/MonologHandler.php @@ -28,7 +28,7 @@ protected function write(LogRecord $record): void $record->channel, $record->level, $record->message, - (array_merge($record->toArray(), [ 'context' => $this->addContext($record->context) ])), + array_merge($record->toArray()['context'], $this->addContext($record->context)), $record->extra, $record->formatted)); } From 9e3a0684779a1631b16363e343aa319c009c032b Mon Sep 17 00:00:00 2001 From: Michael Scola Date: Wed, 15 Feb 2023 15:22:51 -0600 Subject: [PATCH 07/14] removed unnecessary --- src/MonologHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MonologHandler.php b/src/MonologHandler.php index 66bcd02..491c7eb 100644 --- a/src/MonologHandler.php +++ b/src/MonologHandler.php @@ -28,7 +28,7 @@ protected function write(LogRecord $record): void $record->channel, $record->level, $record->message, - array_merge($record->toArray()['context'], $this->addContext($record->context)), + $this->addContext($record->context), $record->extra, $record->formatted)); } From 0ad823ef29178dfe18643af7f3966af1b6fa53c3 Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Fri, 24 Feb 2023 05:44:04 -0600 Subject: [PATCH 08/14] Fixed the failing tests because of required minimum stability --- .github/workflows/ci.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 123845c..7afa19c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,23 +68,16 @@ jobs: run: composer create-project laravel/laravel rollbar-test-app ${{ matrix.laravel }} - name: Install that code using Composer rigged to look in the parent directory - id: composer_require working-directory: rollbar-test-app - continue-on-error: true + # We arbitrarily set the version to 1.0.0, because we just need composer + # to consider it to be stable. run: | - composer config repositories.local '{"type":"path", "url":".."}' - composer require rollbar/rollbar-laravel - - - name: Try to resolve requirements into an installable set of packages - working-directory: rollbar-test-app - # This adds time, so only run this if the previous step fails. - if: ${{ steps.composer_require.outcome == 'failure' }} - # We are ok removing the lock file since it was generated in step 3, - # before we included all our requirements. - run: | - rm composer.lock - composer require rollbar/rollbar-laravel - composer install + composer config repositories.local '{ + "type":"path", + "url":"..", + "options": {"versions": {"rollbar/rollbar-laravel": "1.0.0"}} + }' + composer require rollbar/rollbar-laravel -W - name: Setup .env working-directory: rollbar-test-app From e553f3db50702995e01e4eee9b84420f4a842378 Mon Sep 17 00:00:00 2001 From: Michael Scola Date: Fri, 24 Feb 2023 08:57:49 -0600 Subject: [PATCH 09/14] Updated Rollbar version and Testbench --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9548389..7fc8dc9 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,10 @@ "require": { "php": "^8.1", "illuminate/support": "^10.0", - "rollbar/rollbar": "^3.1" + "rollbar/rollbar": "^4.0" }, "require-dev": { - "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", + "orchestra/testbench": "^8.0", "mockery/mockery": "^1", "php-coveralls/php-coveralls": "^2.2", "squizlabs/php_codesniffer": "3.*", From c3af14cabcb6f1979b601fb4c02132be55e98652 Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Mon, 27 Feb 2023 16:57:00 -0600 Subject: [PATCH 10/14] Added a workflow file for testing updates to the v7 branch --- .github/workflows/ci-7.x.yml | 152 +++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 .github/workflows/ci-7.x.yml diff --git a/.github/workflows/ci-7.x.yml b/.github/workflows/ci-7.x.yml new file mode 100644 index 0000000..41fa73b --- /dev/null +++ b/.github/workflows/ci-7.x.yml @@ -0,0 +1,152 @@ +# Primary CI checks for Rollbar-PHP-Laravel. +# We're checking that logging within Laravel passes through the Rollbar Laravel +# integration when that integration is properly installed. We make this check +# for all supported combinations of Laravel, Rollbar, and PHP. We are not +# checking that messages are properly sent to Rollbar: that's handled by +# rollbar-php. +# +# Test with act: +# brew install act +# act -P ubuntu-latest=shivammathur/node:latest +# +# @see https://github.com/nektos/act/issues/329 +name: Rollbar-PHP-Laravel CI, master + +# Fire this action on pushes to main branch (master) as well as other branches +# or pull requests, excluding those in the next/ lineage. Also, run every day +# at 02:42 GMT -- this catches failures from transitive dependencies. +on: + push: + branches: + - next/7.x/** + tags: + - v7.* + pull_request: + branches: + - next/7.x/** + schedule: + - cron: '42 2 * * *' + +jobs: + # Check that this runs on all combinations of Laravel we claim to support. + laravel-tests: + strategy: + matrix: + os: [ubuntu] + php: [8.1, 8.0, 7.4, 7.3, 7.2] + laravel: [^9, ^8, ^7, ^6] + exclude: + # Laravel 6 requires php 7.2-8.0, so exclude all php versions after 8.1 + - laravel: ^6 + php: 8.1 + # Laravel 7 requires php 7.2-8.0, so exclude all php versions after 8.1 + - laravel: ^7 + php: 8.1 + # Laravel 8 requires php 7.3+, so exclude all PHP versions prior to 7.3 + - laravel: ^8 + php: 7.2 + # Laravel 9 requires php ^8.0.2, so exclude all PHP versions prior to 8.0.2 + - laravel: ^9 + php: 7.2 + - laravel: ^9 + php: 7.3 + - laravel: ^9 + php: 7.4 + env: + ROLLBAR_TOKEN: "ad865e76e7fb496fab096ac07b1dbabb" + name: Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }} (${{ matrix.os }}) + runs-on: ${{ matrix.os }}-latest + steps: + - name: Checkout the code + uses: actions/checkout@v2 + + - name: Install PHP and composer environment + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl + + - name: Create Laravel test app + run: composer create-project laravel/laravel rollbar-test-app ${{ matrix.laravel }} + + - name: Install that code using Composer rigged to look in the parent directory + id: composer_require + working-directory: rollbar-test-app + continue-on-error: true + run: | + composer config repositories.local '{"type":"path", "url":".."}' + composer config minimum-stability dev + composer config prefer-stable true + composer require rollbar/rollbar-laravel -W + + - name: Setup .env + working-directory: rollbar-test-app + run: | + echo "ROLLBAR_TOKEN=${ROLLBAR_TOKEN}" >> .env + echo "GITHUB_RUN_ID=${GITHUB_RUN_ID}" >> .env + chmod 400 .env + + - name: Configure Laravel to use Rollbar and configure Rollbar to invoke logging callback + working-directory: rollbar-test-app + run: | + > config/logging.php echo ' "rollbar", + "channels" => array ( + "rollbar" => array ( + "driver" => "monolog", + "handler" => \Rollbar\Laravel\MonologHandler::class, + "access_token" => env("ROLLBAR_TOKEN"), + "level" => "debug", + // use the check_ignore filter to capture log messages for verification + "check_ignore" => "check_ignore", + ) + ) + ); + ' + touch app/helpers.php + > tmp-composer.json jq '.autoload += { "files": [ "app/helpers.php" ] }' composer.json + mv tmp-composer.json composer.json + composer dump-autoload + + - name: Define logging callback that invokes when Laravel logs through Rollbar + working-directory: rollbar-test-app + run: | + > app/helpers.php echo ' tests/Feature/LoggingTest.php echo 'assertFileExists(temp_file(), + "Rollbar check_ignore handler not invoked, suggesting an issue integrating Rollbar into Laravel."); + $this->assertSame($value, file_get_contents(temp_file()), + "check_ignore file did not contain expected value, suggesting file left by another process."); + } + } + ' + + - name: Invoke the Laravel test suite + working-directory: rollbar-test-app + run: | + ./vendor/bin/phpunit From 66317f953b0d13c4eff4787e88c74a53895538b3 Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Mon, 27 Feb 2023 16:58:22 -0600 Subject: [PATCH 11/14] Updated the CI test workflow for v8 and Laravel 10 --- .github/workflows/ci.yml | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7afa19c..ff09b27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,25 +31,8 @@ jobs: strategy: matrix: os: [ubuntu] - php: [8.1, 8.0, 7.4, 7.3, 7.2] - laravel: [^9, ^8, ^7, ^6] - exclude: - # Laravel 6 requires php 7.2-8.0, so exclude all php versions after 8.1 - - laravel: ^6 - php: 8.1 - # Laravel 7 requires php 7.2-8.0, so exclude all php versions after 8.1 - - laravel: ^7 - php: 8.1 - # Laravel 8 requires php 7.3+, so exclude all PHP versions prior to 7.3 - - laravel: ^8 - php: 7.2 - # Laravel 9 requires php ^8.0.2, so exclude all PHP versions prior to 8.0.2 - - laravel: ^9 - php: 7.2 - - laravel: ^9 - php: 7.3 - - laravel: ^9 - php: 7.4 + php: [8.2, 8.1] + laravel: [^10] env: ROLLBAR_TOKEN: "ad865e76e7fb496fab096ac07b1dbabb" name: Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }} (${{ matrix.os }}) @@ -77,6 +60,8 @@ jobs: "url":"..", "options": {"versions": {"rollbar/rollbar-laravel": "1.0.0"}} }' + composer config minimum-stability dev + composer config prefer-stable true composer require rollbar/rollbar-laravel -W - name: Setup .env @@ -135,7 +120,7 @@ jobs: // Laravel logging mechanism into Rollbar $value = sprintf("%s-%s", env("GITHUB_RUN_ID"), rand()); - \Log::error($value); + \Illuminate\Support\Facades\Log::error($value); // check that we have our random value written into our local file $this->assertFileExists(temp_file(), From 037bd0ced7b2f1ec3aa6a82881f46ab0ad95caa1 Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Mon, 6 Mar 2023 11:25:18 -0600 Subject: [PATCH 12/14] Updated the typing and comments on internal methods. --- src/MonologHandler.php | 38 +++++++++++++++++++++++----------- src/RollbarServiceProvider.php | 21 ++++++++++--------- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/src/MonologHandler.php b/src/MonologHandler.php index 491c7eb..b8e6ac1 100644 --- a/src/MonologHandler.php +++ b/src/MonologHandler.php @@ -2,39 +2,53 @@ namespace Rollbar\Laravel; +use Illuminate\Contracts\Foundation\Application; use Monolog\Handler\RollbarHandler; use Monolog\LogRecord; class MonologHandler extends RollbarHandler { - protected $app; + protected Application $app; /** - * @param $app + * Sets the Laravel application, so it can be used to get the current user and session data later. + * + * @param Application $app The Laravel application. + * * @return void */ - public function setApp($app) + public function setApp(Application $app): void { $this->app = $app; } /** - * @param LogRecord $record + * Custom write method to add the Laravel context to the log record for Rollbar. + * + * @param LogRecord $record The Monolog log record. + * * @return void */ protected function write(LogRecord $record): void { - parent::write(new LogRecord($record->datetime, - $record->channel, - $record->level, - $record->message, - $this->addContext($record->context), - $record->extra, - $record->formatted)); + parent::write( + new LogRecord( + $record->datetime, + $record->channel, + $record->level, + $record->message, + $this->addContext($record->context), + $record->extra, + $record->formatted + ) + ); } /** - * @param array $context + * Adds the Laravel context to the log record for Rollbar. This includes person and session data. + * + * @param array $context The {@see LogRecord::context} array. + * * @return array */ protected function addContext(array $context = []): array diff --git a/src/RollbarServiceProvider.php b/src/RollbarServiceProvider.php index 7b79415..55461c6 100644 --- a/src/RollbarServiceProvider.php +++ b/src/RollbarServiceProvider.php @@ -4,7 +4,7 @@ use Rollbar\RollbarLogger; use Illuminate\Support\Arr; use InvalidArgumentException; -use Rollbar\Laravel\MonologHandler; +use Illuminate\Contracts\Foundation\Application; use Illuminate\Support\Facades\Config; use Illuminate\Support\ServiceProvider; @@ -13,14 +13,14 @@ class RollbarServiceProvider extends ServiceProvider /** * Register the service provider. */ - public function register() + public function register(): void { // Don't register rollbar if it is not configured. if ($this->stop() === true) { return; } - $this->app->singleton(RollbarLogger::class, function ($app) { + $this->app->singleton(RollbarLogger::class, function (Application $app) { $defaults = [ 'environment' => $app->environment(), @@ -54,7 +54,7 @@ public function register() return Rollbar::logger(); }); - $this->app->singleton(MonologHandler::class, function ($app) { + $this->app->singleton(MonologHandler::class, function (Application $app) { $level = static::config('level', 'debug'); @@ -66,7 +66,7 @@ public function register() } /** - * Check if we should prevent the service from registering + * Check if we should prevent the service from registering. * * @return boolean */ @@ -82,15 +82,16 @@ public function stop() : bool } /** - * Return a rollbar logging config + * Return a rollbar logging config. + * + * @param string $key The config key to lookup. + * @param mixed $default The default value to return if the config is not found. * - * @param array|string $key - * @param mixed $default * @return mixed */ - protected static function config($key = '', $default = null) + protected static function config(string $key = '', mixed $default = null): mixed { - $envKey = 'ROLLBAR_'.strtoupper($key); + $envKey = 'ROLLBAR_' . strtoupper($key); if ($envKey === 'ROLLBAR_ACCESS_TOKEN') { $envKey = 'ROLLBAR_TOKEN'; From 88b53b27b9090706d4c55f18169ba152ead334ea Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Mon, 6 Mar 2023 11:26:30 -0600 Subject: [PATCH 13/14] Updated test $access_token from dynamic to declared property for PHP 8.2 --- tests/RollbarTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/RollbarTest.php b/tests/RollbarTest.php index a893603..d86e673 100644 --- a/tests/RollbarTest.php +++ b/tests/RollbarTest.php @@ -11,9 +11,10 @@ class RollbarTest extends \Orchestra\Testbench\TestCase { + private string $access_token = 'B42nHP04s06ov18Dv8X7VI4nVUs6w04X'; + protected function setUp(): void { - $this->access_token = 'B42nHP04s06ov18Dv8X7VI4nVUs6w04X'; putenv('ROLLBAR_TOKEN=' . $this->access_token); parent::setUp(); From 193a53f6716a71f7f2c0f3f085fd95f6ddeba464 Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Mon, 6 Mar 2023 11:37:29 -0600 Subject: [PATCH 14/14] Added the missing 'framework' parameter to the Rollbar config --- src/RollbarServiceProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RollbarServiceProvider.php b/src/RollbarServiceProvider.php index 7b79415..5a42065 100644 --- a/src/RollbarServiceProvider.php +++ b/src/RollbarServiceProvider.php @@ -49,6 +49,7 @@ public function register() if ($handler === AgentHandler::class) { $config['handler'] = 'agent'; } + $config['framework'] = 'laravel ' . app()->version(); Rollbar::init($config, $handleException, $handleError, $handleFatal); return Rollbar::logger();