fix: logging configuration handling#1023
Conversation
Note(s) for PR Auther:
Note(s) for PR Reviewer(s):
|
SummaryThe following content is AI-generated and provides a summary of the pull request: Fix Logging Configuration HandlingBug Fix🐛 Bug Fix: Resolved logging configuration issues when running outside of development mode. ChangesThis pull request addresses logging configuration problems that occurred when the application was not running in development mode. The changes ensure proper logging behavior across different runtime environments.
The fix ensures that logging configuration is properly applied after uvicorn initializes, preventing conflicts between uvicorn's built-in logging and the application's custom logging setup. The solution also maintains compatibility with the test environment by detecting pytest runs and skipping the reconfiguration step when tests are executing.
PR Bot InformationVersion:
|
There was a problem hiding this comment.
The pull request correctly fixes the logging configuration by ensuring uvicorn respects the custom logging setup. I've identified one concern about losing configuration flexibility in the Docker CMD, which should be addressed.
PR Bot Information
Version: 1.17.61 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback
- Correlation ID:
2f9d7e30-10bd-11f1-9c8b-031709ae8b03 - LLM:
anthropic--claude-4.5-sonnet - Event Trigger:
pull_request.opened
There was a problem hiding this comment.
Summary
The pull request improves logging configuration by switching from fastapi run to direct Python execution with uvicorn.run(), adding environment variable support for host/port configuration. However, one bug was identified: the PORT environment variable parsing lacks error handling and will crash the application if set to a non-numeric value. This should be addressed before merging.
PR Bot Information
Version: 1.17.61 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback
- LLM:
anthropic--claude-4.5-sonnet - Event Trigger:
issue_comment.created - Correlation ID:
1b3b2e50-10be-11f1-8cc0-496c849df459
b477c06 to
05cbeb6
Compare
make host and port configurable s
05cbeb6 to
c2d88ed
Compare
There was a problem hiding this comment.
Summary
The pull request introduces a lifespan event handler to properly manage logging configuration when uvicorn starts. I identified one substantive bug: the AsyncGenerator type annotation is incomplete and missing the required send type parameter. This should be corrected to ensure proper type checking.
PR Bot Information
Version: 1.17.61 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback
- Event Trigger:
issue_comment.created - LLM:
anthropic--claude-4.5-sonnet - Correlation ID:
71308b30-1162-11f1-8f3b-5e7cd99e3f55
Description
Changes proposed in this pull request:
Related issue(s)