Windows Azure Web sites python -
after whole load of hard work i've got hello world flask app running on windows azure, app built locally , runs fine, deploying azure nightmare though. i've sort of got 2 questions here.
i can't seem stack trace @ all, i've tried setting things in web.config, documentation on how use stuff apawling, can find literally badly written blog posts dotted around 1 of microsoft's millions of blogs. doesn't me fix problem.
the second question relates first one, due horrible debugging methods (taking application apart , commenting things out) feel pymongo causing this, i've built without c extensions , it's in site-packages , works on local machine. without stack trace i've no idea how fix without wanting pull hair out.
can shed light on this? disappointing because rest of azure isn't bad, theres far better website hosting alternatives out there heroku literally 10 command setups. i've been working on day far..
solved
for interested ended solving problem manually adding error handling flask application bypassing iis settings , windows azure configs - far complicated no documentation @ all.
from werkzeug.debug import get_current_traceback @app.errorhandler(500) def internal_server_error(e): base = os.path.dirname(os.path.abspath(__file__)) f = open('%s/logs/error.log' % (base), 'a') track = get_current_traceback(skip=1, show_hidden_frames=true, ignore_system_exceptions=false) track.log(f) f.close() return 'an error has occured', 500
Comments
Post a Comment