Browse Source

fix:mongo日志正常返回就不记录结果了,错误返回就记录啦

Roc 11 months ago
parent
commit
ae9eb96e4c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      init_serve/mongo.go

+ 2 - 1
init_serve/mongo.go

@@ -51,7 +51,8 @@ func MgoNewClient() *qmgo.Client {
 			if ok {
 				commands = v.(bson.Raw)
 			}
-			global.MONGO_LOG.Info("\n【MongoDB】[%.3fms] [%v] %v \n", float64(evt.Duration)/1e6, commands, evt.Reply)
+			//global.MONGO_LOG.Info("\n【MongoDB】[%.3fms] [%v] %v \n", float64(evt.Duration)/1e6, commands, evt.Reply)
+			global.MONGO_LOG.Info("\n【MongoDB】[%.3fms] [%v] \n", float64(evt.Duration)/1e6, commands)
 		},
 		Failed: func(_ context.Context, evt *event.CommandFailedEvent) {
 			//log.Printf("Command: %v Failure: %v\n",