Comments (5)
Does Server::bootstrap()
call pluginBootstlap()
?
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 Application::handle()
.
from cake-sentry.
I would like to make it available without the need for manual rewriting by the user.
To do so, it's best if it can be completed by executing a single command.
If that's not possible, I'd like to at least have only one point to rewrite.
We need to register the Logger and register the ErrorHander.
What is the approach taken by the other plugins?
Here are a few picks from Awesome-cakephp. A brief survey is described below.
whoops error handler
https://github.com/dereuromark/cakephp-whoops
Instead of using "Plugin::load()", it is recommended to replace the simple way handlers are registered.
NOTE: This plugin doesn't need to register Logger.
database logger
https://github.com/dereuromark/CakePHP-DatabaseLog
This plugin instructs the user to run "plugin load" and set up the log by rewriting app.php.
FYI: The rewriting of "app.php" seems to be much simpler and less error-prone than the rewriting of bootstrap.
airbrake
https://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".
In addition, they don't have bootstrap.php.
from cake-sentry.
The simplest approach would be something like this.
- Keep the configuration as it is
- Encapsulate the configuration changes in bootstrap.php.
- Remove the description that recommends loading plugins by command
- Require a manual rewrite of Application.php. In doing so.
- Make it clear that "addPlugin()" needs to be called after " parent::bootstrap();".
from cake-sentry.
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.
However, that was a mistake, and it was eliminated by ef4487e
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.
from cake-sentry.
Fix in c8b2b74
from cake-sentry.
Related Issues (20)
- Exception not being sent to Sentry HOT 3
- CakeSentry.Client.afterCapture event is dispatched after ErrorController rendering. HOT 1
- CakePHP 4 support HOT 4
- Breadcrumb Recursion
- Error with sentry/sentry:2.4.0 HOT 1
- Sentry Performance
- Compatibility with guzzlehttp/guzzle 7.2.0 ? HOT 1
- PHP 8 compatibility HOT 3
- Release for 4.x HOT 4
- Blocking all exceptions when enabling Sentry? HOT 1
- CLI Support HOT 4
- Record useful logs as Breadcrumbs to understand and reproduce the situation. HOT 2
- Adding scope does not work HOT 2
- Cake 4.4 deprecation warning HOT 2
- Some exceptions are not grouped properly (`/app/webroot/index.php in ?`) HOT 1
- CakePHP 4.4: Use of `BaseErrorHandler` and subclasses are deprecated. HOT 1
- convertLevelToSeverity Method behaves incorrectly
- PHP 8.1 and 8.2 ready
- issue while installing in cake php 3.7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cake-sentry.