chore: 增加错误日志
This commit is contained in:
@ -41,6 +41,7 @@ func (r *record) watch(ctx context.Context) {
|
|||||||
// 检查ip是否可以访问
|
// 检查ip是否可以访问
|
||||||
count++
|
count++
|
||||||
if err := r.checkIP(ctx, r.value); err != nil {
|
if err := r.checkIP(ctx, r.value); err != nil {
|
||||||
|
r.logger.Ctx(ctx).Error("check ip err", zap.Error(err))
|
||||||
// 连续3次无法访问,暂停记录
|
// 连续3次无法访问,暂停记录
|
||||||
if !r.isDisable && count > 3 {
|
if !r.isDisable && count > 3 {
|
||||||
count = 0
|
count = 0
|
||||||
|
Reference in New Issue
Block a user