fix(log) fix produce msg, remove more route

This commit is contained in:
黎白南 2021-10-08 21:04:54 +08:00
parent 1540651864
commit 77d4b88c71
1 changed files with 7 additions and 2 deletions

View File

@ -40,7 +40,12 @@ func (l *upLogger) Print(level string, format string, msg ...interface{}) {
Print(level, format, msg...)
eventMiddle := event.NewEvent(middleMsg.EventNameLog)
eventMiddle.SetValue(middleMsg.EventKeyLog, middleMsg.LogContext{})
eventMiddle.SetValue(middleMsg.EventKeyLog, middleMsg.LogContext{
Level: level,
Data: time.Now(),
Msg: fmt.Sprintf(format, msg...),
Route: findPlace(),
})
l.produce.Call(l.ctx, eventMiddle)
}
@ -80,7 +85,7 @@ func findPlace() string {
var (
place string
i = 0
i = 3
)
for {