better logging
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user