From 710f28831ec428d726173dcd69352e8c31ac5731 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 13 Jul 2022 16:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=97=A5=E5=BF=97=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/{mgolog => dbservice}/core.go | 0 modules/{mgolog => dbservice}/db_comp.go | 0 modules/{mgolog => dbservice}/module.go | 0 modules/modulebase.go | 12 +++--------- services/comp_gateroute.go | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) rename modules/{mgolog => dbservice}/core.go (100%) rename modules/{mgolog => dbservice}/db_comp.go (100%) rename modules/{mgolog => dbservice}/module.go (100%) diff --git a/modules/mgolog/core.go b/modules/dbservice/core.go similarity index 100% rename from modules/mgolog/core.go rename to modules/dbservice/core.go diff --git a/modules/mgolog/db_comp.go b/modules/dbservice/db_comp.go similarity index 100% rename from modules/mgolog/db_comp.go rename to modules/dbservice/db_comp.go diff --git a/modules/mgolog/module.go b/modules/dbservice/module.go similarity index 100% rename from modules/mgolog/module.go rename to modules/dbservice/module.go diff --git a/modules/modulebase.go b/modules/modulebase.go index 1694957f5..52b611ccc 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -253,17 +253,11 @@ func (this *ModuleBase) Warnf(format string, a ...interface{}) { } } func (this *ModuleBase) Errorf(format string, a ...interface{}) { - if this.options.GetDebug() { - this.options.GetLog().Errorf(fmt.Sprintf("[Module:%s] ", this.module.GetType())+format, a...) - } + this.options.GetLog().Errorf(fmt.Sprintf("[Module:%s] ", this.module.GetType())+format, a...) } func (this *ModuleBase) Panicf(format string, a ...interface{}) { - if this.options.GetDebug() { - this.options.GetLog().Panicf(fmt.Sprintf("[Module:%s] ", this.module.GetType())+format, a...) - } + this.options.GetLog().Panicf(fmt.Sprintf("[Module:%s] ", this.module.GetType())+format, a...) } func (this *ModuleBase) Fatalf(format string, a ...interface{}) { - if this.options.GetDebug() { - this.options.GetLog().Fatalf(fmt.Sprintf("[Module:%s] ", this.module.GetType())+format, a...) - } + this.options.GetLog().Fatalf(fmt.Sprintf("[Module:%s] ", this.module.GetType())+format, a...) } diff --git a/services/comp_gateroute.go b/services/comp_gateroute.go index cf49817d0..07c4df6f6 100644 --- a/services/comp_gateroute.go +++ b/services/comp_gateroute.go @@ -158,7 +158,7 @@ func (this *SCompGateRoute) ReceiveMsg(ctx context.Context, args *pb.AgentMessag } else { reply.Reply = session.Polls() if this.options.Debug { - log.Debugf("[Handle Api] consumetime:%v method:%s uid:%s msg:%v reply:%v", time.Since(stime), method, args.UserId, msg, reply) + log.Debugf("[Handle Api] consumetime:%v method:%s uid:%s msg:%v reply:%#v", time.Since(stime), method, args.UserId, msg, reply) } } } else { //未找到消息处理函数