I have 3 domains that belong to the same organization and I am trying to come up with a proper and convenient means of handling errors across all sites.
For starters, my sites are designed as such:
- Error reporting is set to ALL
- Custom error handler throws exceptions
- All code (except the page header and footer) are wrapped in a try/catch
- On exception, a simple message is displayed to the user and the exception is logged to file (in a private folder)
This works fine, except that I have 3 websites to check for errors, and I often forget about 2 of them. The third shows the errors when a user logs in as administrator (as the file is locally available). All 3 sites are administrated via an admin portal on the main site.
I thought about logging the errors to database so the main site could show everything, but this breaks if it is a database error (such as temporarily unavailable).
Any suggestions would be appreciated.