If you can't run docker or you're in the situation that you need to run your python exception-collector under windows, then this might be useful.
- requests
- flask
e.g.:
pip install requests FlaskFirst change the line with db_file in it in server.py to include the path to where the server application should store its database.
E.g. db_file = 'c:/exceptionpickler/data.db'
Then, to install as a windows service:
python server.py --startup auto install
sc start ExceptionPicklerIn your code, add:
import include_meThen in each try...except, add:
include_me.transmit_exception(e)(assuming that you capture the exception into a variable called e).
Also make sure to change the exceptionpickler_server line in include_me.py to let it point to the exceptionpickler-server (see the flask invocation above).
You can also install the capturer system-wide. For that, copy sitecustomize.py into the python search-path. Do not forget to adapt the exceptionpickler_server line in that file.
To see which paths are searched by python, invoke this in the python command line interpreter:
import sys
print(sys.path)You can see the collected tracebacks by pointing your web-browser to http://ip-adres-of-server:4009/
Written by Folkert van Heusden for Grover Underdogs.