-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App exceptions should be logged to aid support investigations #432
Comments
This is error handling and reporting that RSR developers would need to add to the codebase so that we have something to work with from an Ops perspective when something falls over. Currently we only seem to have the raw HTTP traffic logged in our nginx logs but nothing in the RSR web app log itself (other than some very minor debug info that seems to be obsolete anyway). For example, wherever we've previously had warnings of a 'server error' during RSR execution (and we've subsequently seen a traceback when debug mode is enabled), this indicates an unhandled exception. Developers should either be coding to fix such errors or provide sufficient log file commentary so that we can diagnose and resolve any configuration or operational issues quickly enough. |
Here's a good article about coding useful exception handling and esp. how to write meaningful exception messages to quickly diagnose and resolve support issues: http://programmers.stackexchange.com/questions/29433/how-to-write-a-good-exception-message The point is really that 5 min of coding time to write decent error handling will save 2 hours of wasted ops time trying to find out why something is broken. |
In 10-base.conf: Add ExceptionLoggingMiddleware to MIDDLEWARE_CLASSES Create settings for the paths to and names of the logging files, akvo.log and akvo.error.log. LOG_FILE_PATH is now set to the "default" path used in the vagrant setup. Remove LOGGING In 90-finish.conf: Add ACCESS_LOG_FILE_FULL_NAME and ERROR_LOG_FILE_FULL_NAME Edit LOGGING to support the new exception handling middleware logger Also some cleanup of the LOGGING setting. It will need more work when we start using logging more in earnest.
Bah, missed a #. Here's the other commit related to this: 5ec2276 |
@zzgvh If this is done - can we create a pull request for checking? |
Merged in #536 |
Test planGIVEN RSR |
Currently if an exception occurs on the live RSR server this isn't logged in the RSR log file, which makes investigating failures and configuration problems more difficult. Any unhandled exceptions should be logged, even when RSR isn't running in debug mode.
The text was updated successfully, but these errors were encountered: