IP名单同步时增加调试信息

This commit is contained in:
刘祥超
2023-09-12 16:05:18 +08:00
parent e4937685bc
commit d067cd8437

View File

@@ -229,6 +229,11 @@ func (this *IPListManager) DeleteExpiredItems() {
func (this *IPListManager) processItems(items []*pb.IPItem, fromRemote bool) { func (this *IPListManager) processItems(items []*pb.IPItem, fromRemote bool) {
var changedLists = map[*IPList]zero.Zero{} var changedLists = map[*IPList]zero.Zero{}
for _, item := range items { for _, item := range items {
// 调试
if Tea.IsTesting() {
this.debugItem(item)
}
var list *IPList var list *IPList
// TODO 实现节点专有List // TODO 实现节点专有List
if item.ServerId > 0 { // 服务专有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+"'")
}
}