Skip to content

Commit 7bb7730

Browse files
authored
fix: prevent infinite logging loop caused by file changes triggering log writes (#210)
1 parent e4a8eb9 commit 7bb7730

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
# Run the FastAPI app with uvicorn
4545
# Disable reload in production/Docker environment
4646
is_development = os.environ.get("NODE_ENV") != "production"
47+
48+
if is_development:
49+
# Prevent infinite logging loop caused by file changes triggering log writes
50+
logging.getLogger("watchfiles.main").setLevel(logging.WARNING)
51+
4752
uvicorn.run(
4853
"api.api:app",
4954
host="0.0.0.0",

0 commit comments

Comments
 (0)