Add request logging capabilities to API handlers and update .gitignore

Enhance API response handling by storing responses in context and updating request logger to include API responses
This commit is contained in:
Luis Pater
2025-08-16 05:03:10 +08:00
parent 4155805ad6
commit fcadf08921
10 changed files with 191 additions and 26 deletions

View File

@@ -38,7 +38,7 @@ func RequestLoggingMiddleware(logger logging.RequestLogger) gin.HandlerFunc {
c.Next()
// Finalize logging after request processing
if err := wrapper.Finalize(); err != nil {
if err = wrapper.Finalize(c); err != nil {
// Log error but don't interrupt the response
// In a real implementation, you might want to use a proper logger here
}