From b26db99ee74df75be014b310a959026a897d0eff Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sun, 27 Dec 2020 13:02:50 -0700 Subject: [PATCH] Fix part_id field in logs --- server/backup/backup_s3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/backup/backup_s3.go b/server/backup/backup_s3.go index 8e22fec..9fd8c41 100644 --- a/server/backup/backup_s3.go +++ b/server/backup/backup_s3.go @@ -135,11 +135,11 @@ func (s *S3Backup) generateRemoteRequest(rc io.ReadCloser) error { // Attempt to upload the part. if _, err := handlePart(part, partSize); err != nil { - l.WithField("part_id", part).WithError(err).Warn("failed to upload part") + l.WithField("part_id", i+1).WithError(err).Warn("failed to upload part") return err } - l.WithField("part_id", part).Info("successfully uploaded backup part") + l.WithField("part_id", i+1).Info("successfully uploaded backup part") } l.WithField("parts", partCount).Info("backup has been successfully uploaded")