-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Missing prod debug handler #11053
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
Labels
Comments
Is this related to this ad or not? |
Sort of yes: by default, fatal errors are not handled in prod env I think. |
@nicolas-grekas it's never worked for me. So I do not understand the announcement on the blog. |
looks like duplicate of older issue #8281 |
You're right, thanks for the hint @Koc |
Some more discussions about this topic in #6474 8000 p> |
This was referenced Sep 27, 2014
fabpot
added a commit
that referenced
this issue
Oct 3, 2014
…-grekas) This PR was merged into the 2.6-dev branch. Discussion ---------- [FrameworkBundle] enable ErrorHandler in prod | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #11053, #8281 | License | MIT | Doc PR | - - a new debug.error_handler service is the registered PHP error handler, with ErrorHandler::register() as factory - ErrorHandler::register() is patched so that it checks if the currently registered error handler is an instance of ErrorHandler - in which case it returns this instance and don't create a new one. - DebugHandlersListener now listen to ConsoleEvents and re-injects fatal errors within the $app->renderException code path - DebugHandlersListener also has a new $scream parameter to control is silenced errors are logged or not Commits ------- fac3cc4 [FrameworkBundle] register ErrorHandler at boot time 4acf5d3 [Debug] make screaming configurable 4d0ab7d [FrameworkBundle] enable ErrorHandler in prod
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follup of this comment:
Something is missing since a long time in the configuration of the prod environment for error handling: the
ErrorsLoggersListener
does aErrorHandler::setLogger()
, butErrorHandler::register()
is never called, so no logging can ever happen, except the one done by the native PHP handler.This led me to two points:
ErrorHandler::register()
, and useset_error_handler()
's second argument to catch only what we want to catch (thus no perf impact in prod).log_errors
anderror_log
ini settings? Because IMHO it could be a good idea to put native php logs inapp/logs/
, if the settings are not configured.The text was updated successfully, but these errors were encountered: