From de3e7db234acdc34812b3df899ff57facb948218 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Tue, 12 Sep 2023 16:05:18 +0800 Subject: [PATCH] =?UTF-8?q?IP=E5=90=8D=E5=8D=95=E5=90=8C=E6=AD=A5=E6=97=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/iplibrary/manager_ip_list.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/internal/iplibrary/manager_ip_list.go b/internal/iplibrary/manager_ip_list.go index a06a414..6b75af8 100644 --- a/internal/iplibrary/manager_ip_list.go +++ b/internal/iplibrary/manager_ip_list.go @@ -229,6 +229,11 @@ func (this *IPListManager) DeleteExpiredItems() { func (this *IPListManager) processItems(items []*pb.IPItem, fromRemote bool) { var changedLists = map[*IPList]zero.Zero{} for _, item := range items { + // 调试 + if Tea.IsTesting() { + this.debugItem(item) + } + var list *IPList // TODO 实现节点专有List if item.ServerId > 0 { // 服务专有List @@ -300,3 +305,12 @@ func (this *IPListManager) processItems(items []*pb.IPItem, fromRemote bool) { } } } + +// 调试IP信息 +func (this *IPListManager) debugItem(item *pb.IPItem) { + if item.IsDeleted { + remotelogs.Debug("IP_ITEM_DEBUG", "delete '"+item.IpFrom+"'") + } else { + remotelogs.Debug("IP_ITEM_DEBUG", "add '"+item.IpFrom+"'") + } +}