engine
engine copied to clipboard
chore: Single log line for each request
PR-Codex overview
This PR focuses on refactoring the code for better type handling, improving error and request logging, and updating middleware functionalities in the Fastify server. It enhances type imports, modifies error handling, and optimizes usage reporting and logging mechanisms.
Detailed summary
- Changed imports from
import { ... }
toimport type { ... }
forQueue
andFastifyInstance
. - Removed logger calls in the error handling middleware.
- Updated condition checks in
withServerUsageReporting
for clearer logic. - Changed logging from
onRequest
toonSend
inwithRequestLogs
. - Enhanced request logging to include more detailed information.
- Updated handling of paths in logging and usage reporting to include
ADMIN_QUEUES_BASEPATH
.
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}