Ticket #10797 (closed: fixed)
Improve logging
Reported by: | MarcusNoble | Owned by: | MarcusNoble |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.4 |
Component: | Tools | Keywords: | AUTOREDUCTION |
Cc: | Blocked By: | ||
Blocking: | Tester: | Lottie Greenwood |
Description (last modified by MarcusNoble) (diff)
Currently the log output is pretty dire as no timestamps are printed out.
This should be resolved using the logging options available in Django: https://docs.djangoproject.com/en/dev/topics/logging/
At the very least the log level, timestamp and message need to be logged.
This will likely be a wide change in that the way the logger is loaded may need changing.
I think it would be beneficial to also improve error pages at the same time to display the exception to admins and to modify the "contact us" email link to include the time of the error to make looking up the problem in the logs much simpler.
Log files need to be rotated either daily or based on size.
For Tester:
To view the results of the improved logging log on to autoreduce.isis.cclrc.ac.uk and view '/var/log/autoreduction.log' and on reduce.isis.cclrc.ac.uk view 'C:\autoreduce\WebApp\ISIS\autoreduce_webapp\autoreduction.log'.