Commit 276834296235d6af22824b52b3f1ebe713a6698c
Add basic loggin in server
| | | | 153 | | 153 | |
---|
154 | app.config.from_object(conf) | 154 | app.config.from_object(conf) |
---|
155 | | 155 | |
---|
| | 156 | import logging,os |
---|
| | 157 | from logging import FileHandler |
---|
| | 158 | |
---|
| | 159 | fil = FileHandler(os.path.join(os.path.dirname(__file__),'logme'),mode='a') |
---|
| | 160 | fil.setLevel(logging.ERROR) |
---|
| | 161 | app.logger.addHandler(fil) |
---|
| | 162 | |
---|
| | 163 | |
---|
| | 164 | |
---|
156 | if __name__ == "__main__": | 165 | if __name__ == "__main__": |
---|
157 | app.run(debug=True, host=conf.HOST, port=conf.PORT) | 166 | app.run(debug=True, host=conf.HOST, port=conf.PORT) |
---|