better logging

This commit is contained in:
2025-10-25 17:54:18 +02:00
parent eb4be2926b
commit 12688b9770
2 changed files with 19 additions and 12 deletions

View File

@@ -13,21 +13,15 @@ if __name__ == "__main__":
log_config = get_uvicorn_log_config()
# Run the application with logging.
# Exclude directories that should not trigger reloads to prevent
# infinite loops caused by log file writes.
# Only watch .py files in src/, explicitly exclude __pycache__.
# This prevents reload loops from .pyc compilation.
uvicorn.run(
"src.server.fastapi_app:app",
host="127.0.0.1",
port=8000,
reload=True,
reload_excludes=[
"logs/*",
"data/*",
"Temp/*",
"__pycache__/*",
"*.log",
"*.json",
"*.jsonl",
],
reload_dirs=["src"],
reload_includes=["*.py"],
reload_excludes=["*/__pycache__/*", "*.pyc"],
log_config=log_config,
)