Explorar el Código

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

Roc hace 10 meses
padre
commit
99cc96f1a6
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      utils/mgodb/mgo_config.go

+ 2 - 1
utils/mgodb/mgo_config.go

@@ -58,7 +58,8 @@ func MgoNewClient(mgoConfig MgoConfig) *qmgo.Client {
 			if ok {
 				commands = v.(bson.Raw)
 			}
-			utils.MongoLog.Info("\n【MongoDB】[%.3fms] [%v] %v \n", float64(evt.Duration)/1e6, commands, evt.Reply)
+			//utils.MongoLog.Info("\n【MongoDB】[%.3fms] [%v] %v \n", float64(evt.Duration)/1e6, commands, evt.Reply)
+			utils.MongoLog.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",