Commit 8181191aeed47706543d65a4c5903aadc3799255
- Diff rendering mode:
- inline
- side by side
fetch.py
(6 / 0)
  | |||
2 | 2 | from flask import request | |
3 | 3 | from flask import render_template | |
4 | 4 | from flask import make_response | |
5 | from logging import FileHandler | ||
5 | 6 | import json | |
6 | 7 | import pymongo | |
7 | 8 | import os | |
… | … | ||
61 | 61 | return i.split('/')[-1] | |
62 | 62 | ls = map(sanitize, ls) | |
63 | 63 | return render_template('history.html', ls=ls) | |
64 | |||
65 | #Log the errors, don't depend on apache to log it for you. | ||
66 | fil = FileHandler(os.path.join(os.path.dirname(__file__),'logme'),mode='a') | ||
67 | fil.setLevel(logging.ERROR) | ||
68 | app.logger.addHandler(fil) | ||
64 | 69 | ||
65 | 70 | ||
66 | 71 | if __name__ == "__main__": |