mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-04 07:31:53 +08:00
IP名单同步时增加调试信息
This commit is contained in:
@@ -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+"'")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user