engine icon indicating copy to clipboard operation
engine copied to clipboard

chore: Single log line for each request

Open arcoraven opened this issue 4 months ago • 0 comments

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 { ... } to import type { ... } for Queue and FastifyInstance.
  • Removed logger calls in the error handling middleware.
  • Updated condition checks in withServerUsageReporting for clearer logic.
  • Changed logging from onRequest to onSend in withRequestLogs.
  • 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}

arcoraven avatar Oct 05 '24 01:10 arcoraven