1

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

1
  • If an error can't be catched (not all php errors can be catched), there is no wy to log them with php Commented Nov 22, 2013 at 18:53

1 Answer 1

1

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. :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.