Skip to content

Commit

Permalink
Add logfile path into Config
Browse files Browse the repository at this point in the history
  • Loading branch information
servilla committed Sep 10, 2024
1 parent 934ed7b commit 8a19225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions config.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@


class Config:
LOGFILE = "PATH TO LOGFILE"
CACHE = "PATH TO CONTENT AND INDEX CACHE DIRECTORY"
5 changes: 2 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import uvicorn
from starlette.staticfiles import StaticFiles

from config import Config
from views import about
from views import resources
from views import support
Expand All @@ -33,10 +34,8 @@
from views import webinars


cwd = os.path.dirname(os.path.realpath(__file__))
logfile = cwd + "/web-x.log"
daiquiri.setup(level=logging.INFO,
outputs=(daiquiri.output.File(logfile), "stdout",))
outputs=(daiquiri.output.File(Config.LOGFILE), "stdout",))
logger = daiquiri.getLogger(__name__)


Expand Down

0 comments on commit 8a19225

Please sign in to comment.