Skip to content

Commit

Permalink
Add slightly more debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Nov 1, 2022
1 parent 1a5ea81 commit 12c8b7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/gcrcleaner/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,15 @@ func (s *Server) HTTPHandler() http.HandlerFunc {

// clean reads the given body as JSON and starts a cleaner instance.
func (s *Server) clean(ctx context.Context, r io.ReadCloser) (map[string][]string, int, error) {
s.logger.Debug("starting clean request", "version", version.HumanVersion)

var p Payload
if err := json.NewDecoder(r).Decode(&p); err != nil {
return nil, 500, fmt.Errorf("failed to decode payload as JSON: %w", err)
}

s.logger.Debug("starting clean request",
"version", version.HumanVersion,
"payload", p)

// Convert duration to a negative value, since we're about to "add" it to the
// since time.
sub := time.Duration(p.Grace)
Expand Down

0 comments on commit 12c8b7b

Please sign in to comment.