Closed
Description
Follup of this comment:
Something is missing since a long time in the configuration of the prod environment for error handling: the ErrorsLoggersListener
does a ErrorHandler::setLogger()
, but ErrorHandler::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:
- I think we should always call
ErrorHandler::register()
, and useset_error_handler()
's second argument to catch only what we want to catch (thus no perf impact in prod). - Does Symfony have recommended settings for
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.