Commit 17746e3d authored by Jérome Perrin's avatar Jérome Perrin

log to a file

parent 8be92106
...@@ -2,6 +2,8 @@ import json ...@@ -2,6 +2,8 @@ import json
import traceback import traceback
import multiprocessing import multiprocessing
import pydot import pydot
import os.path
import logging
from flask import Flask, jsonify, redirect, url_for from flask import Flask, jsonify, redirect, url_for
from flask import request from flask import request
...@@ -86,7 +88,11 @@ def _runSimulation(parameter_dict, queue): ...@@ -86,7 +88,11 @@ def _runSimulation(parameter_dict, queue):
def main(*args): def main(*args):
app.run(debug=True) file_handler = logging.FileHandler(os.path.join(os.path.dirname(__file__), '..', '..', 'log', 'dream.log'))
file_handler.setLevel(logging.DEBUG)
app.logger.addHandler(file_handler)
app.run(debug=True, host="2001:67c:1254:6c::3eb3")
if __name__ == "__main__": if __name__ == "__main__":
main() main()
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment