From ad03c272892ec96fc90fd9e1a571b97b35ada8eb Mon Sep 17 00:00:00 2001 From: yuzuki999 Date: Mon, 19 Jun 2023 11:08:15 +0800 Subject: [PATCH] add node change log --- core/xray/distro/all/all.go | 2 +- node/task.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/xray/distro/all/all.go b/core/xray/distro/all/all.go index 1a5f307..18057ee 100644 --- a/core/xray/distro/all/all.go +++ b/core/xray/distro/all/all.go @@ -21,7 +21,7 @@ import ( _ "github.com/xtls/xray-core/app/dns" _ "github.com/xtls/xray-core/app/dns/fakedns" _ "github.com/xtls/xray-core/app/log" - _ "github.com/xtls/xray-core/app/metrics" + //_ "github.com/xtls/xray-core/app/metrics" _ "github.com/xtls/xray-core/app/policy" _ "github.com/xtls/xray-core/app/reverse" _ "github.com/xtls/xray-core/app/router" diff --git a/node/task.go b/node/task.go index 6ee3c0f..0cc05de 100644 --- a/node/task.go +++ b/node/task.go @@ -55,6 +55,7 @@ func (c *Controller) nodeInfoMonitor() (err error) { if newNodeInfo != nil { // nodeInfo changed // Remove old tag + log.Printf("[%s] Node changed, reload...", c.Tag) err = c.server.DelNode(c.Tag) if err != nil { log.Printf("[%s] Del node error: %s", c.Tag, err) @@ -107,6 +108,7 @@ func (c *Controller) nodeInfoMonitor() (err error) { } c.nodeInfo = newNodeInfo c.userList = newUserInfo + log.Printf("[%s] Added %d new users", c.Tag, len(newUserInfo)) // exit return nil }