I want to populate my error log with useful information if and when errors occur. I'd like to use the log to be able to spot and fix bugs on my site, but also to potentially log hack attempts. For a PHP web app, what information is considered vital and why? What info can be useful? What is overkill?
My current list is:
- The type of error.
- The corresponding error message.
- The URL where the error occurred.
- A timestamp.
- The user's IP and user agent.
- The referring URL.