From 68248780df177264c52499a594f33ef333e4bde8 Mon Sep 17 00:00:00 2001 From: proxy666-dev <53252627+proxy666-dev@users.noreply.github.com> Date: Sun, 31 May 2020 17:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/gost/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/gost/main.go b/cmd/gost/main.go index f08f413..4c886fa 100644 --- a/cmd/gost/main.go +++ b/cmd/gost/main.go @@ -16,6 +16,7 @@ import ( ) var ( + LogMode string configureFile string baseCfg = &baseConfig{} pprofAddr string @@ -31,6 +32,7 @@ func init() { flag.Var(&baseCfg.route.ChainNodes, "F", "forward address, can make a forward chain") flag.Var(&baseCfg.route.ServeNodes, "L", "listen address, can listen on multiple ports (required)") + flag.StringVar(&LogMode, "LM", "", "log mode") flag.StringVar(&configureFile, "C", "", "configure file") flag.BoolVar(&baseCfg.Debug, "D", false, "enable debug log") flag.BoolVar(&printVersion, "V", false, "print version") @@ -45,6 +47,8 @@ func init() { os.Exit(0) } + gost.SetLogMode(LogMode) + if configureFile != "" { _, err := parseBaseConfig(configureFile) if err != nil {