diff --git a/webservice/ws_eidastats/helper_functions.py b/webservice/ws_eidastats/helper_functions.py index bd1dc6c..9f04abb 100644 --- a/webservice/ws_eidastats/helper_functions.py +++ b/webservice/ws_eidastats/helper_functions.py @@ -10,7 +10,10 @@ from sqlalchemy.orm import sessionmaker +logging.basicConfig() log = logging.getLogger(__name__) +log.setLevel(os.getenv('LOGLEVEL', logging.INFO)) + dbURI = os.getenv('DBURI', 'postgresql://postgres:password@localhost:5432/eidastats') engine = create_engine(dbURI, pool_size=10, max_overflow=20) Session = sessionmaker(engine) diff --git a/webservice/ws_eidastats/views_submit.py b/webservice/ws_eidastats/views_submit.py index 475682d..6d4695c 100644 --- a/webservice/ws_eidastats/views_submit.py +++ b/webservice/ws_eidastats/views_submit.py @@ -1,8 +1,6 @@ -from requests import status_codes from pyramid.response import Response from pyramid.view import view_config from datetime import datetime -import os import json import mmh3 from ws_eidastats.helper_functions import log, Session