feat: add logs

pull/2608/head
icey-yu 1 year ago
parent 5555f31961
commit 176eb00941

@ -222,9 +222,9 @@ func (c *ConsumerHandler) Push2Group(ctx context.Context, groupID string, msg *s
defer func(duration time.Time) {
t := time.Since(duration)
if t.Seconds() > 5 {
log.ZWarn(ctx, "Get group msg from msg_transfer and push msg", nil, "msg", msg.String(), "groupID", groupID, "time cost", t)
log.ZWarn(ctx, "Get group msg from msg_transfer and push msg end", nil, "msg", msg.String(), "groupID", groupID, "time cost", t)
} else {
log.ZDebug(ctx, "Get group msg from msg_transfer and push msg", "msg", msg.String(), "groupID", groupID, "time cost", t)
log.ZDebug(ctx, "Get group msg from msg_transfer and push msg end", "msg", msg.String(), "groupID", groupID, "time cost", t)
}
}(time.Now())
var pushToUserIDs []string

@ -55,7 +55,7 @@ func (o *OnlineCache) getUserOnlinePlatform(ctx context.Context, userID string)
log.ZError(ctx, "OnlineCache GetUserOnlinePlatform", err, "userID", userID)
return nil, err
}
log.ZDebug(ctx, "OnlineCache GetUserOnlinePlatform", "userID", userID, "platformIDs", platformIDs)
//log.ZDebug(ctx, "OnlineCache GetUserOnlinePlatform", "userID", userID, "platformIDs", platformIDs)
return platformIDs, nil
}

Loading…
Cancel
Save