From 45bb5eadfc13ace8b69ee661ceac0949ccd3faf0 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 9 Aug 2022 11:02:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drpcx=20=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lego/sys/rpcx/options.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lego/sys/rpcx/options.go b/lego/sys/rpcx/options.go index 679f1892a..2c9df5714 100644 --- a/lego/sys/rpcx/options.go +++ b/lego/sys/rpcx/options.go @@ -118,10 +118,8 @@ func newOptionsByOption(opts ...Option) (options *Options, err error) { if len(options.ServiceTag) == 0 || len(options.ServiceType) == 0 || len(options.ServiceId) == 0 || len(options.ConsulServers) == 0 { return options, errors.New("[Sys.RPCX] newOptions err: 启动参数异常") } - if options.Debug && options.Log == nil { - if options.Log = log.NewTurnlog(options.Debug, log.Clone("sys.rpc", 2)); options.Log == nil { - err = errors.New("log is nil") - } + if options.Log = log.NewTurnlog(options.Debug, log.Clone("sys.rpc", 2)); options.Log == nil { + err = errors.New("log is nil") } return options, nil }