Add better logging for s3 backup uploads

This commit is contained in:
Matthew Penner 2020-11-01 15:36:16 -07:00
parent 317e54acc5
commit 05cfb59e18

View File

@ -76,7 +76,10 @@ func (s *S3Backup) generateRemoteRequest(rc io.ReadCloser) error {
return err return err
} }
log.Debug("attempting to upload backup to remote S3 endpoint") log.WithFields(log.Fields{
"backup_id": s.Uuid,
"adapter": "s3",
}).Info("attempting to upload backup..")
handlePart := func(part string, size int64) (string, error) { handlePart := func(part string, size int64) (string, error) {
r, err := http.NewRequest(http.MethodPut, part, nil) r, err := http.NewRequest(http.MethodPut, part, nil)
@ -151,6 +154,10 @@ func (s *S3Backup) generateRemoteRequest(rc io.ReadCloser) error {
return err return err
} }
log.WithFields(log.Fields{
"backup_id": s.Uuid,
"adapter": "s3",
}).Info("backup has been successfully uploaded")
return nil return nil
} }