ValentinH
ValentinH

Reputation: 958

Symfony2 Error Logging

I'd like to know how to configure my production environnement to log all the errors. Indeed, I have errors like PHP fatal errors which occured and wasn't logged and I don't understand why. Actually they were log int the apache logs, but is there a way to log all of them in the log folder of my application?

Thanks, Valentin

Upvotes: 1

Views: 1835

Answers (1)

Martin Lie
Martin Lie

Reputation: 1187

There's several errors that cannot be handled (and thus logged) by your own (or Symfony's/Monolog's) error handlers, cf. the set_error_handler documentation. So while it's possible to log some errors, you can't log all (parse/compile errors, for example). This is a limitation inherent in PHP.

Apparently, there's a workaround by detecting and logging errors in register_shutdown_function, but I'm not sure if that's what you're asking for. :)

Upvotes: 1

Related Questions