Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a health check. #4

Merged
merged 4 commits into from
Aug 30, 2024
Merged

feat: Add a health check. #4

merged 4 commits into from
Aug 30, 2024

Conversation

cafuego
Copy link
Contributor

@cafuego cafuego commented Aug 30, 2024

No description provided.

@cafuego cafuego requested a review from orakili August 30, 2024 04:48
Copy link
Contributor

@orakili orakili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I adjusted the log config file to ensure access logs are logged in the access.log file.

access.log example

2024-08-30 07:59:17,312 - uvicorn.access - INFO - 172.18.0.12:55726 - "POST /text/correlate/keywords HTTP/1.1" 200
2024-08-30 08:05:14,922 - uvicorn.access - INFO - 172.18.0.12:45420 - "GET /status HTTP/1.1" 200

uvicorn.log example

2024-08-30 08:05:01,527 - uvicorn.error - INFO - Shutting down
2024-08-30 08:05:01,634 - uvicorn.error - INFO - Waiting for application shutdown.
2024-08-30 08:05:01,635 - uvicorn.error - INFO - Application shutdown complete.
2024-08-30 08:05:01,635 - uvicorn.error - INFO - Finished server process [8]
2024-08-30 08:05:04,810 - uvicorn.error - INFO - Started server process [48]
2024-08-30 08:05:04,810 - uvicorn.error - INFO - Waiting for application startup.
2024-08-30 08:05:04,810 - uvicorn.error - INFO - Application startup complete.

Note: the logger name for uvicorn is uvicorn.error regardless of whether the log entry is for an error or some info like the statup ones in the example above. See encode/uvicorn#562

@orakili orakili merged commit a34c458 into develop Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants