Created
November 5, 2012 18:07
-
-
Save tmacam/4019350 to your computer and use it in GitHub Desktop.
Simple Flask app to collect backtraces.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python -u | |
# vim:ts=4:sts=4:sw=4:et:wrap:ai:fileencoding=utf-8: | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route('/', methods=['POST', 'GET']) | |
def collect_backtrace(): | |
data = str(request.data) | |
with open('backtrace.txt', 'a') as fh: | |
fh.write(data + '\n') | |
fh.flush() | |
print data | |
return "", 200 | |
if __name__ == '__main__': | |
app.run(debug=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment