Browse Source

Fix: v2ctl failed to get geodata loaders (#1014)

Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
ght99 4 years ago
parent
commit
faee88163c
1 changed files with 4 additions and 2 deletions
  1. 4 2
      infra/control/main/main.go

+ 4 - 2
infra/control/main/main.go

@@ -5,7 +5,9 @@ import (
 	"fmt"
 	"os"
 
-	commlog "github.com/v2fly/v2ray-core/v4/common/log"
+	"github.com/v2fly/v2ray-core/v4/common/log"
+	_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/memconservative"
+	_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
 	"github.com/v2fly/v2ray-core/v4/infra/control"
 )
 
@@ -18,7 +20,7 @@ func getCommandName() string {
 
 func main() {
 	// let the v2ctl prints log at stderr
-	commlog.RegisterHandler(commlog.NewLogger(commlog.CreateStderrLogWriter()))
+	log.RegisterHandler(log.NewLogger(log.CreateStderrLogWriter()))
 	name := getCommandName()
 	cmd := control.GetCommand(name)
 	if cmd == nil {