Skip to content

Commit

Permalink
Add URI to logs and errors for better debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mjh1 committed Jan 25, 2024
1 parent 803ed70 commit 34b0017
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ func Upload(input io.Reader, outputURI string, waitBetweenWrites, writeTimeout t
err = backoff.Retry(func() error {
_, err := session.SaveData(context.Background(), "", bytes.NewReader(fileContents), fields, segmentWriteTimeout)
if err != nil {
glog.Errorf("failed upload attempt: %v", err)
glog.Errorf("failed upload attempt for %s: %v", outputURI, err)

Check warning on line 67 in core/uploader.go

View check run for this annotation

Codecov / codecov/patch

core/uploader.go#L67

Added line #L67 was not covered by tests
}
return err
}, UploadRetryBackoff())
if err != nil {
return fmt.Errorf("failed to upload video: %w", err)
return fmt.Errorf("failed to upload video %s: %w", outputURI, err)

Check warning on line 72 in core/uploader.go

View check run for this annotation

Codecov / codecov/patch

core/uploader.go#L72

Added line #L72 was not covered by tests
}

if err = extractThumb(session, outputURI, fileContents); err != nil {
glog.Errorf("extracting thumbnail failed: %v", err)
glog.Errorf("extracting thumbnail failed for %s: %v", outputURI, err)

Check warning on line 76 in core/uploader.go

View check run for this annotation

Codecov / codecov/patch

core/uploader.go#L76

Added line #L76 was not covered by tests
}
return nil
}
Expand Down

0 comments on commit 34b0017

Please sign in to comment.