-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
Add support for laravel 5.6 log channels #122
Add support for laravel 5.6 log channels #122
Conversation
Please replace $app = app(); |
Laravel 5.6 requries PHP |
Hey @patrickbrouwers, thanks for taking the time to create this PR 👍 sorry it took so long to get here :) I am reading through the docs for custom log channels and seeing this:
https://laravel.com/docs/5.6/logging#creating-custom-channels Wouldn't it be nicer to simply have a |
@stayallive that's also an option, but I'd personally prefer to enter a short string there. Also looking at how other packages handle this (https://docs.bugsnag.com/platforms/php/laravel/#reporting-unhandled-exceptions) it seems that's kind of the way to go. |
Would you be willing to rename Apart from that LGTM! Thanks again! |
@stayallive I can if you want, but it's not really a channel, but more of a factory. Let me know what you prefer. |
Yes, you are totally right. However I think in the Laravel context this a how a channel is defined. So that's why Also for people (for whatever reason) using the class directly in their config it would "look" better without the So my vote would be to leave it out. |
@stayallive , sure! I changed it. |
@stayallive not sure why cs-fixer fails for php5.6 ? |
You branch was a bit behind with older Travis / dependency thingies (I thought) 😄 It was phpcs not liking the |
At least we have good old fashion isset checks still :) |
Cool, that worked, will release this in the coming days (release for sentry-php base package also incoming, will release at the same time). |
@stayallive thanks! |
Nice, but who's going to update the readme? It's still mentioning the "old" way... |
@royduin what do you mean? It is documented...? Or is it missing things? https://github.com/getsentry/sentry-laravel#using-laravel-56-log-channels |
Lol, didn't saw it in this PR. I didn't scroll all the way down, sorry! And thanks 😎 |
As #119 states Laravel 5.6 adds a nice new way of having log channels.
Integration would be as easy as: