Skip to content

Commit

Permalink
revise: log mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
labasubagia committed Sep 15, 2023
1 parent fb873bb commit 026e314
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/adapter/repository/mongo/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ func NewDB(config util.Config, logger port.Logger) (DB, error) {
var query any
json.Unmarshal([]byte(event.Command.String()), &query)
subLogger := port.GetCtxSubLogger(ctx, logger)
subLogger.Info().
Field("query", query).
Field("command", event.CommandName).
Field("db", event.DatabaseName).
Msg("Mongo Command")

subLogger.Info().Field("query", query).Msgf("mongo %s", event.CommandName)
},
}
clientOpts.SetMonitor(cmdMonitor)
Expand Down

0 comments on commit 026e314

Please sign in to comment.