Commit 276834296235d6af22824b52b3f1ebe713a6698c

Add basic loggin in server
  • Diff rendering mode:
  • inline
  • side by side

mouchak/server.py

153153
154app.config.from_object(conf)154app.config.from_object(conf)
155155
156import logging,os
157from logging import FileHandler
158
159fil = FileHandler(os.path.join(os.path.dirname(__file__),'logme'),mode='a')
160fil.setLevel(logging.ERROR)
161app.logger.addHandler(fil)
162
163
164
156if __name__ == "__main__":165if __name__ == "__main__":
157 app.run(debug=True, host=conf.HOST, port=conf.PORT)166 app.run(debug=True, host=conf.HOST, port=conf.PORT)