debug模式不发送日志

This commit is contained in:
goldensea
2026-01-06 17:52:49 +08:00
parent 3e7c42952b
commit 722097701f

View File

@@ -312,6 +312,9 @@ const datetimeFmt = time.DateOnly + " " + time.TimeOnly
// 记录日志
func (sdk *SDK) Log(uid, event string, property map[string]any, timezone string, customEventTime ...time.Time) {
if g.Cfg().MustGet(ctx, "debug").Bool() {
return
}
loc := time.Local
if _loc := getLocationMapValue(timezone); _loc != nil {
loc = _loc