logger.Info("failed to fetch URL", // Structured context as strongly typed Field values. zap.String("url", url), zap.Int("attempt", 3), zap.Duration("backoff", time.Second), )
[1] https://github.com/uber-go/zap
For example: https://pkg.go.dev/golang.org/x/exp/slog#example-Group
sugar.Infow("failed to fetch URL", "url", "http://example.com", "attempt", 3, "backoff", time.Second, )
[1] https://github.com/uber-go/zap