Skip to content

Commit

Permalink
Loglevel can be set with env var
Browse files Browse the repository at this point in the history
  • Loading branch information
jschaeff committed Mar 25, 2024
1 parent 0fe2bb8 commit eb6ed27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions webservice/ws_eidastats/helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions webservice/ws_eidastats/views_submit.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit eb6ed27

Please sign in to comment.