Skip to content

Commit fada22c

Browse files
wecodingclaude
andcommitted
chore: disable GIN debug logging for consistent JSON output
- Set GIN to release mode (gin.SetMode(gin.ReleaseMode)) - Discard GIN default output (gin.DefaultWriter = io.Discard) - All HTTP request logging now goes through RequestLog middleware which uses zap JSON output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 48f8677 commit fada22c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

internal/api/router.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package api
66

77
import (
8+
"io"
89
"net/http"
910

1011
"github.com/gin-gonic/gin"
@@ -24,6 +25,10 @@ import (
2425

2526
// NewRouter creates a new Gin router with all middleware and routes configured.
2627
func NewRouter(reg driver.Registry) *gin.Engine {
28+
// Disable GIN debug logging and set to release mode
29+
gin.SetMode(gin.ReleaseMode)
30+
gin.DefaultWriter = io.Discard
31+
2732
r := gin.New()
2833

2934
// Global middleware

0 commit comments

Comments
 (0)