Skip to content

Missing prod debug handler #11053

Closed
Closed
@nicolas-grekas

Description

@nicolas-grekas

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 use set_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 and error_log ini settings? Because IMHO it could be a good idea to put native php logs in app/logs/, if the settings are not configured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions