Skip to content

Commit 6d80da1

Browse files
committed
feat(chat): add more log for debug
1 parent ab3ea04 commit 6d80da1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

chat/agent.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ func countParamsLength(params map[string]any) int {
215215
case map[string]any:
216216
// 非叶子节点,压入栈中待处理
217217
stack = append(stack, val)
218+
default:
219+
logrus.Warnln("[chat] agent unknown params typ:", reflect.TypeOf(v))
218220
}
219221
}
220222
}
@@ -234,7 +236,7 @@ func logev(ctx *zero.Ctx) {
234236
}
235237
plen := countParamsLength(req.Params)
236238
if plen > 1024 { // skip too long req&resp
237-
logrus.Debugln("[chat] agent", gid, "skip too long", plen, "bytes requ:", &req)
239+
logrus.Infoln("[chat] agent", gid, "skip too long", plen, "bytes requ.")
238240
return
239241
}
240242
if _, ok := ctx.State[zero.StateKeyPrefixKeep+"_chat_ag_triggered__"]; ok {

0 commit comments

Comments
 (0)