From 0b649557bb4ba707f0ed2f769471030a6715dffc Mon Sep 17 00:00:00 2001 From: Marwan Sulaiman Date: Thu, 9 Jan 2020 18:15:37 -0500 Subject: [PATCH] stasher: log when a stash event occurs (#1518) * stasher: log when a stash event occurs * rm space --- pkg/stash/stasher.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/stash/stasher.go b/pkg/stash/stasher.go index 3937b546..7dbb8607 100644 --- a/pkg/stash/stasher.go +++ b/pkg/stash/stasher.go @@ -5,6 +5,7 @@ import ( "time" "github.com/gomods/athens/pkg/errors" + "github.com/gomods/athens/pkg/log" "github.com/gomods/athens/pkg/module" "github.com/gomods/athens/pkg/observ" "github.com/gomods/athens/pkg/storage" @@ -44,6 +45,7 @@ func (s *stasher) Stash(ctx context.Context, mod, ver string) (string, error) { const op errors.Op = "stasher.Stash" _, span := observ.StartSpan(ctx, op.String()) defer span.End() + log.EntryFromContext(ctx).Debugf("saving %s@%s to storage...", mod, ver) // create a new context that ditches whatever deadline the caller passed // but keep the tracing info so that we can properly trace the whole thing.