添加日志

This commit is contained in:
lmk
2026-08-21 16:31:43 +08:00
parent 610f914085
commit 486c4a2ff7
+6
View File
@@ -2,6 +2,7 @@ package video
import (
"context"
"encoding/json"
"fmt"
dto "media/model/dto/video"
@@ -19,6 +20,11 @@ func (c *template) CreateTemplate(ctx context.Context, req *dto.CreateTemplateTa
ctx = withUser(ctx)
g.Log().Infof(ctx, "[模板视频] 收到请求 入参: video_count=%d, template_count=%d, callback=%s",
len(req.VideoURLs), len(req.Templates), req.CallbackURL)
if reqJSON, err := json.MarshalIndent(req, "", " "); err == nil {
g.Log().Infof(ctx, "[lmk模板视频] 完整入参(JSON):\n%s", string(reqJSON))
} else {
g.Log().Infof(ctx, "[lmk模板视频] 完整入参序列化失败: %v, 原始: %+v", err, *req)
}
if len(req.VideoURLs) < 1 {
return nil, fmt.Errorf("至少需要1个视频")