Skip to content

Commit 7892120

Browse files
fix(api): silenzia log httpx/httpcore che generavano 60+ righe per ogni upload di file
1 parent 9763f8a commit 7892120

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Silenced verbose httpx/httpcore logs that spammed 60+ lines per file upload
12+
1013
## [1.1.4] - 2025-12-02
1114

1215
### Added

api/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
# Disable buffering for real-time logs
2323
sys.stdout.reconfigure(line_buffering=True) if hasattr(sys.stdout, 'reconfigure') else None
2424

25+
# Silence verbose HTTP client logs (httpx logs every single request)
26+
logging.getLogger("httpx").setLevel(logging.WARNING)
27+
logging.getLogger("httpcore").setLevel(logging.WARNING)
28+
2529
logger = logging.getLogger(__name__)
2630

2731
from fastapi import FastAPI, Request

0 commit comments

Comments
 (0)