feat(platform): 日志管理 - 统一日志出口并屏蔽查询与 Agent 流式事件日志
新增 internal/logging,slog、标准库 log、GORM 与 Gin 访问日志共用同一 Handler,由 CANVAS_LOG_LEVEL / CANVAS_LOG_FORMAT 控制。info 级别不再输出成功的查询类请求、成功 SQL、message_end 等 Agent 流式事件和常规画布自动保存;4xx/5xx、慢请求、慢 SQL、SQL 失败与 panic 仍会记录,SQL 不内联参数值。
This commit is contained in:
1 parent
b7ff958c2d
commit
a0f025aa96
21 files changed
+602
-44
No files matched your search
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"log"
|
||||
"log/slog"
|
||||
"math"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -403,7 +403,7 @@ func (s *Service) CreateCloudAgentRun(userID string, req CloudAgentRequest, pare
|
||||
return nil, err
|
||||
}
|
||||
if superseded {
|
||||
log.Printf("agent run %s cannot resume after a contract change; continuing in a new turn", parentID)
|
||||
slog.Info("agent run cannot resume after a contract change; continuing in a new turn", "run", parentID)
|
||||
} else if !cloudAgentRunTerminal(parentRun.Status) || parentRun.CleanupPending {
|
||||
return nil, kernel.NewAppError(409, "上一轮 Agent 尚未结束")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user