-
Notifications
You must be signed in to change notification settings - Fork 26
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
with cake plugin load
, the plugin seems not to work
#36
Comments
Does https://github.com/cakephp/cakephp/blame/4.0.7/src/Http/Server.php#L112-L114 Based on that, Middleware's responsibility can be supplemented for errors that occur inside of |
I would like to make it available without the need for manual rewriting by the user. What is the approach taken by the other plugins? whoops error handlerhttps://github.com/dereuromark/cakephp-whoops Instead of using "Plugin::load()", it is recommended to replace the simple way handlers are registered. database loggerhttps://github.com/dereuromark/CakePHP-DatabaseLog This plugin instructs the user to run "plugin load" and set up the log by rewriting app.php. airbrakehttps://github.com/chrisShick/AirbrakeCake They take a similar approach to the whoops-plugin, with, said "You don't have to enable the Plugin because it uses an error handler. Therefore, all you have to do is replace this line in the app/Config/bootstrap.php". |
The simplest approach would be something like this.
|
I was aware of an issue where the error wasn't properly passed to ErrorHandler and thought it was due to the timing of the bootstrapping. It is possible that ErrorHandler and Logger settings may be overridden due to compatibility with other plugins. Since the behavior is a matter of what the user is using, it may be enough to suggest the possibility without changing the basic method. |
Fix in c8b2b74 |
#29 (comment)
After
bin/cake plugin load Connehito/CakeSentry
in CakePHP4,Applicaiton.php
is modified like below.This does not apply the Error/Logger settings correctly
The text was updated successfully, but these errors were encountered: