Skip to content

Commit c3d4766

Browse files
hweawerCopilot
andauthored
Logs for writeback executor (#519)
* Logs for writeback executor * Update lib/persistedretry/writeback/executor.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1a7f781 commit c3d4766

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/persistedretry/writeback/executor.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ func (e *Executor) Exec(r persistedretry.Task) error {
7474
func (e *Executor) upload(t *Task) error {
7575
start := time.Now()
7676

77+
log.With("namespace", t.Namespace, "name", t.Name).Info("Uploading cache file to the remote backend")
7778
client, err := e.backends.GetClient(t.Namespace)
7879
if err != nil {
7980
if err == backend.ErrNamespaceNotFound {
@@ -105,6 +106,7 @@ func (e *Executor) upload(t *Task) error {
105106
if err := client.Upload(t.Namespace, t.Name, f); err != nil {
106107
return fmt.Errorf("upload: %s", err)
107108
}
109+
log.With("namespace", t.Namespace, "name", t.Name).Info("Uploaded cache file to remote backend")
108110

109111
// We don't want to time noops nor errors.
110112
e.stats.Timer("upload").Record(time.Since(start))

0 commit comments

Comments
 (0)