Go: move logger to common module (#14545)

### What problem does this PR solve?

As title

### Type of change

- [x] Refactoring

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-05-06 10:41:58 +08:00
committed by GitHub
parent 3a51c27a75
commit aa57b5bd8b
56 changed files with 628 additions and 717 deletions

View File

@@ -18,17 +18,16 @@ package handler
import (
"net/http"
"ragflow/internal/common"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"ragflow/internal/logger"
)
// HandleNoRoute handles requests to undefined routes
func HandleNoRoute(c *gin.Context) {
// Log the request details on server side
logger.Logger.Warn("The requested URL was not found",
common.Logger.Warn("The requested URL was not found",
zap.String("method", c.Request.Method),
zap.String("path", c.Request.URL.Path),
zap.String("query", c.Request.URL.RawQuery),