上传日志优化
This commit is contained in:
parent
c251a63adc
commit
710f28831e
@ -253,17 +253,11 @@ func (this *ModuleBase) Warnf(format string, a ...interface{}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (this *ModuleBase) Errorf(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{}) {
|
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{}) {
|
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...)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ func (this *SCompGateRoute) ReceiveMsg(ctx context.Context, args *pb.AgentMessag
|
|||||||
} else {
|
} else {
|
||||||
reply.Reply = session.Polls()
|
reply.Reply = session.Polls()
|
||||||
if this.options.Debug {
|
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 { //未找到消息处理函数
|
} else { //未找到消息处理函数
|
||||||
|
Loading…
Reference in New Issue
Block a user