chore: 增加错误日志

This commit is contained in:
2023-05-18 10:13:38 +08:00
parent 223bf69e44
commit a1a65e8928

View File

@ -41,6 +41,7 @@ func (r *record) watch(ctx context.Context) {
// 检查ip是否可以访问
count++
if err := r.checkIP(ctx, r.value); err != nil {
r.logger.Ctx(ctx).Error("check ip err", zap.Error(err))
// 连续3次无法访问,暂停记录
if !r.isDisable && count > 3 {
count = 0