Public Access
mirror of
https://github.com/xlorepdarkhelm/numinar-coding-project.git
synced 2026-09-11 18:37:36 -04:00
Cleaning up, adding logging and error checking.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
@@ -8,4 +8,4 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from backend.db import get_session
|
||||
|
||||
|
||||
SessionDep = Annotated[AsyncSession, Depends(get_session)]
|
||||
type SessionDep = Annotated[AsyncSession, Depends(get_session)]
|
||||
|
||||
@@ -10,8 +10,6 @@ from fastapi import FastAPI
|
||||
from fastapi import Request
|
||||
from fastapi import Response
|
||||
|
||||
from backend import config
|
||||
|
||||
|
||||
class RedactFilter(logging.Filter):
|
||||
"""Filter to redact sensitive information in logs."""
|
||||
@@ -41,9 +39,6 @@ def setup_logging(app: FastAPI) -> None:
|
||||
logger: logging.Logger = logging.getLogger()
|
||||
logger.setLevel(log_level)
|
||||
|
||||
if config("ENVIRONMENT", default="development") == "development":
|
||||
logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO)
|
||||
|
||||
# Clear any existing handlers to avoid duplicate logs
|
||||
logger.handlers.clear()
|
||||
|
||||
|
||||
@@ -18,10 +18,8 @@ from backend.models import Room
|
||||
from backend.models import User
|
||||
|
||||
|
||||
# Configure logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Python 3.13 type aliases
|
||||
type UserList = list[User]
|
||||
type RoomList = list[Room]
|
||||
type BookingList = list[Booking]
|
||||
|
||||
Reference in New Issue
Block a user