Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create configured logger #93

Closed
Mattnmoore opened this issue Dec 9, 2019 · 4 comments
Closed

Unable to create configured logger #93

Mattnmoore opened this issue Dec 9, 2019 · 4 comments

Comments

@Mattnmoore
Copy link

After upgrading to Laravel 6.*, I've encountered an error while trying to use Rollbar.

Unable to create configured logger. Using emergency logger. {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Monolog\\Handler\\RollbarHandler::__construct() must be an instance of RollbarNotifier, instance of Rollbar\\RollbarLogger given, called in /vagrant/api/vendor/rollbar/rollbar-laravel/src/RollbarServiceProvider.php on line 54 at /vagrant/api/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php:68)

I'm on the dev-master branch of rollbar/rollbar-laravel and the following is my config.

        'rollbar' => [
            'driver' => 'monolog',
            'handler' => \Rollbar\Laravel\MonologHandler::class,
            'access_token' => env('ROLLBAR_TOKEN'),
            'level' => env('ROLLBAR_LEVEL')
        ]

Any help would be appreciated.

@Mattnmoore
Copy link
Author

It looks like MonologHandler.php might be extending the wrong class...If you replace Monolog\Handler\RollbarHandler with Rollbar\Monolog\Handler\RollbarHandler it seems to correct the issue.

@letaniaferreira
Copy link

related issue rollbar/rollbar-php#249

@bxsx
Copy link

bxsx commented Nov 2, 2021

Related issue: rollbar/rollbar-php-symfony-bundle#63

@bxsx bxsx linked a pull request Nov 2, 2021 that will close this issue
@danielmorell
Copy link
Collaborator

The correct handler should be Monolog\Handler\RollbarHandler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants