Skip to content

Commit

Permalink
Update logging path and level
Browse files Browse the repository at this point in the history
  • Loading branch information
servilla committed Aug 24, 2024
1 parent d040981 commit 22b21f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions webapp/config.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
3/28/23
"""
import logging
import pathlib


class Config:

# Logging
LOG_PATH = pathlib.Path('/var/log/pasta')
LOG_LEVEL = logging.WARN

# PASTA+ authentication token attributes
PUBLIC = "public"
SYSTEM = "https://pasta.edirepository.org/authentication"
Expand All @@ -41,8 +46,5 @@ class Config:
# Static directory path
STATIC = "<PATH TO PROJECT ROOT>/static"

# Logging level
LEVEL = logging.INFO

# Proxy timeout (seconds)
TIMEOUT = 120.0
7 changes: 3 additions & 4 deletions webapp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
from filter import audit
from views import index

cwd = os.path.dirname(os.path.realpath(__file__))
logfile = cwd + "/gatekeeper.log"
daiquiri.setup(level=Config.LEVEL,
outputs=(daiquiri.output.File(logfile), "stdout",))

daiquiri.setup(level=Config.LOG_LEVEL,
outputs=(daiquiri.output.File(Config.LOG_PATH), "stdout",))
logger = daiquiri.getLogger(__name__)


Expand Down

0 comments on commit 22b21f9

Please sign in to comment.