Skip to content

Commit

Permalink
Log actual count of uploads.
Browse files Browse the repository at this point in the history
  • Loading branch information
lostlevels committed Apr 29, 2024
1 parent 69214bd commit 7af40c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/store/mongo/mongo_data_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,14 @@ func (d *DataSetRepository) GetDataSetsForUserByID(ctx context.Context, userID s
SetSort(bson.M{"createdTime": -1})
cursor, err := d.Find(ctx, selector, opts)

loggerFields := log.Fields{"userId": userID, "dataSetsCount": len(dataSets), "duration": time.Since(now) / time.Microsecond}
log.LoggerFromContext(ctx).WithFields(loggerFields).WithError(err).Debug("GetDataSetsForUserByID")

if err != nil {
return nil, errors.Wrap(err, "unable to get data sets for user by id")
}

if err = cursor.All(ctx, &dataSets); err != nil {
err = cursor.All(ctx, &dataSets)
loggerFields := log.Fields{"userId": userID, "dataSetsCount": len(dataSets), "duration": time.Since(now) / time.Microsecond}
log.LoggerFromContext(ctx).WithFields(loggerFields).WithError(err).Debug("GetDataSetsForUserByID")
if err != nil {
return nil, errors.Wrap(err, "unable to decode data sets for user by id")
}

Expand Down

0 comments on commit 7af40c9

Please sign in to comment.