-
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
Include monolog hander for Log:: facade #204
Comments
We already support integration with the psr logger, which is the standard. Can I ask why you need monolog please. I'm just trying to understand the use case. :) |
I've got an existing project that already makes use of the Laravel Log facade. Without the monolog adapter, I couldn't find any way for Bugsnag to report on those errors. Even tried adding a test log route to the laravel sample in the repo with no luck - only the exception test route would report to Bugsnag. |
Ah, right, yeh. That is a limitation of Laravel where we can't rebind the facade. |
If you resolve the logger interface from the ioc, that'll work though. |
Like find and replace |
I guess the real way we can fix this in laravel's core is to change the facade binding to that interface, then it'll just work. |
Thanks - I should be able to switch from facade to ioc in this project (and will avoid the facade in future projects). You can feel free to close this (or leave as possible future enhancement). In either case, would be great to add a comment to the docs that the Log:: facade is not supported. Thanks again |
This could be fixed in L5.4 if I change the facade to use the psr interface. |
Hey @GrahamCampbell - I forked this repo (https://github.com/meadsteve/MonoSnag) to create a v3.4 compatible monolog wrapper (https://github.com/pdbreen/MonoSnag). Then, in AppServiceProvider::boot(), I added the following:
Seems like you might be able to roll this or something similar into your package with an appropriate config setting to set the logger level (or disable).
The text was updated successfully, but these errors were encountered: