-
Notifications
You must be signed in to change notification settings - Fork 129
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
LaravelLogger references class that no longer exists (Illuminate\Contracts\Logging\Log) in Laravel 5.6+ #546
Comments
This is a non-issue. That class only exists to support older Laravel versions. On newer Laravel versions, the entire class is not used at all. |
@GrahamCampbell I guess I'm not following why it's not an issue. |
That line checks to see if the class exists, so that we can do the correct thing on both older and newer Laravel. |
I see, is there a clean way to prevent that error from appearing in the |
Are you using the latest version of this package, or a version before that interface_exists check was added? |
I'm using Upon further investigation, it looks like this might be caused by a combination of the import of the old class and the way that the Could the Bugsnag package just check the value of |
Expected behavior
composer update
doesn't produce the errorlaravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (ReflectionException(code: 0): Class 'Illuminate\\Contracts\\Logging\\Log' not found
Observed behavior
The class
Bugsnag\BugsnagLaravel\LaravelLogger
imports this class on line 8 https://github.com/bugsnag/bugsnag-laravel/blob/master/src/LaravelLogger.php#L8 and causes an error to be written to the log ifcomposer update
is run while the.env
includes a reference to thebugsnag
log channel in theLOG_STACK
or if it's referenced in any of the log channels in that file in Laravel 5.6+Steps to reproduce
bugsnag
toconfig/logging.php
.env
composer update
storage/logs/laravel.log
.Version
2.28.0
Additional information
The Laravel team removed the
Illuminate\Contracts\Logging\Log
class in Laravel 5.6 because it was a duplicate ofPsr\Log\LoggerInterface
. This was mentioned in the Laravel 5.6 upgrade guide: https://laravel.com/docs/5.6/upgradeI'm not sure that the reference to the
Psr\Log\LoggerInterface
is even needed inBugsnag\BugsnagLaravel\LaravelLogger
since that class ultimately extendsPsr\Log\AbstractLogger
which already implements the correct interface.Can't comment on Issues?
Some users have been unable to comment on Github issues when an adblocker extension is enabled.
We recommend temporarily disabling the extension, or if that fails, contacting [email protected].
The text was updated successfully, but these errors were encountered: