Add IP address and URL to error messages logged into database