mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-15 05:04:27 +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:
@@ -22,7 +22,6 @@ import (
|
||||
"net/http"
|
||||
"ragflow/internal/common"
|
||||
"ragflow/internal/dao"
|
||||
"ragflow/internal/logger"
|
||||
"ragflow/internal/server"
|
||||
"ragflow/internal/service"
|
||||
"ragflow/internal/utility"
|
||||
@@ -1220,7 +1219,7 @@ func (h *Handler) HandleNoRoute(c *gin.Context) {
|
||||
|
||||
// GetLogLevel returns the current log level
|
||||
func (h *Handler) GetLogLevel(c *gin.Context) {
|
||||
level := logger.GetLevel()
|
||||
level := common.GetLevel()
|
||||
success(c, gin.H{"level": level}, "")
|
||||
}
|
||||
|
||||
@@ -1237,7 +1236,7 @@ func (h *Handler) SetLogLevel(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := logger.SetLevel(req.Level); err != nil {
|
||||
if err := common.SetLevel(req.Level); err != nil {
|
||||
errorResponse(c, err.Error(), 400)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user