Added Uvicorn logging config module
All checks were successful
Build & Publish to GHCR / build (push) Successful in 1m19s
All checks were successful
Build & Publish to GHCR / build (push) Successful in 1m19s
This commit is contained in:
parent
7fd82a6004
commit
d7c820e8fb
@ -7,6 +7,7 @@ fastapi==0.118.2
|
||||
feedparser==6.0.12
|
||||
h11==0.16.0
|
||||
idna==3.10
|
||||
lib-uvicorn-config @ git+https://git.gansejunge.com/notifier/lib-uvicorn-config.git@main
|
||||
mysql-connector-python==9.4.0
|
||||
prometheus_client==0.23.1
|
||||
pydantic==2.12.0
|
||||
|
||||
@ -7,7 +7,7 @@ from feed_handler import grab_latest_chapter_information
|
||||
from send_notification import send_notification
|
||||
from metrics_server import REQUEST_COUNTER
|
||||
import asyncio
|
||||
|
||||
from uvicorn_logger_config import LOGGING_CONFIG
|
||||
|
||||
logger = setup_logger(__name__)
|
||||
|
||||
@ -95,8 +95,8 @@ def get_chapters(request: Request, db = Depends(get_db)):
|
||||
|
||||
async def start_servers():
|
||||
logger.info("[Server] Starting main API (port 5000) and metrics server (port 9000)...")
|
||||
config_main = uvicorn.Config("main:api", host="0.0.0.0", port=5000, log_level=LOG_LEVEL.lower())
|
||||
config_metrics = uvicorn.Config("metrics_server:metrics_api", host="0.0.0.0", port=9000, log_level=LOG_LEVEL.lower())
|
||||
config_main = uvicorn.Config("main:api", host="0.0.0.0", port=5000, log_level=LOG_LEVEL.lower(), log_config=LOGGING_CONFIG)
|
||||
config_metrics = uvicorn.Config("metrics_server:metrics_api", host="0.0.0.0", port=9000, log_level=LOG_LEVEL.lower(), log_config=LOGGING_CONFIG)
|
||||
|
||||
server_main = uvicorn.Server(config_main)
|
||||
server_metrics = uvicorn.Server(config_metrics)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user