diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/cfg/default_settings.py | 2 | ||||
-rw-r--r-- | wqflask/secure_server.py | 5 | ||||
-rwxr-xr-x | wqflask/wqflask/dataSharing/SharingInfo.py | 12 |
3 files changed, 12 insertions, 7 deletions
diff --git a/wqflask/cfg/default_settings.py b/wqflask/cfg/default_settings.py index a575a3bd..d0713e4d 100644 --- a/wqflask/cfg/default_settings.py +++ b/wqflask/cfg/default_settings.py @@ -1,5 +1,7 @@ LOGFILE = """/tmp/flask_gn_log""" +SERVER_PORT = 5000 + #This is needed because Flask turns key errors into a #400 bad request response with no exception/log TRAP_BAD_REQUEST_ERRORS = True diff --git a/wqflask/secure_server.py b/wqflask/secure_server.py index 425fce89..5448dbeb 100644 --- a/wqflask/secure_server.py +++ b/wqflask/secure_server.py @@ -49,16 +49,19 @@ security = Security(app, user_datastore) import logging -file_handler = logging.FileHandler("/tmp/flask_gn_log") +file_handler = logging.FileHandler(app.config['LOGFILE']) file_handler.setLevel(logging.DEBUG) app.logger.addHandler(file_handler) import logging_tree logging_tree.printout() +#print("app.config is:", app.config) + if __name__ == '__main__': #create_user() app.run(host='0.0.0.0', + port=app.config['SERVER_PORT'], use_debugger=False, threaded=True, use_reloader=True) diff --git a/wqflask/wqflask/dataSharing/SharingInfo.py b/wqflask/wqflask/dataSharing/SharingInfo.py index befc158a..41a75222 100755 --- a/wqflask/wqflask/dataSharing/SharingInfo.py +++ b/wqflask/wqflask/dataSharing/SharingInfo.py @@ -34,12 +34,12 @@ import requests from dbFunction import webqtlDatabaseFunction import SharingBody -import logging -logging.basicConfig(filename="/tmp/flask_gn_log", level=logging.INFO) - -_log = logging.getLogger("search") -_ch = logging.StreamHandler() -_log.addHandler(_ch) +#import logging +#logging.basicConfig(filename="/tmp/flask_gn_log", level=logging.INFO) +# +#_log = logging.getLogger("search") +#_ch = logging.StreamHandler() +#_log.addHandler(_ch) |