mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-04 06:40:29 +08:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user