Skip to content

Commit

Permalink
[SQUASH/REWORD] log: More cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Augustus <[email protected]>
  • Loading branch information
justaugustus committed Jan 23, 2022
1 parent d413eea commit ab7c620
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clients/githubrepo/roundtripper/rate_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (gh *rateLimitTransport) RoundTrip(r *http.Request) (*http.Response, error)
// Retry
time.Sleep(duration)
// TODO(log): Previously Warn. Consider logging an error here.
gh.logger.Info(fmt.Sprintf("Rate limit exceeded. Retrying..."))
gh.logger.Info("Rate limit exceeded. Retrying...")
return gh.RoundTrip(r)
}

Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ require (
cloud.google.com/go/pubsub v1.17.0
cloud.google.com/go/trace v0.1.0 // indirect
contrib.go.opencensus.io/exporter/stackdriver v0.13.8
github.com/bombsimon/logrusr/v2 v2.0.1
github.com/bradleyfalzon/ghinstallation/v2 v2.0.4
github.com/go-git/go-git/v5 v5.4.2
github.com/go-logr/logr v1.2.2
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.5.7
github.com/google/go-containerregistry v0.8.0
Expand All @@ -22,6 +24,7 @@ require (
github.com/onsi/gomega v1.17.0
github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa
github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.3.0
github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f
go.opencensus.io v0.23.0
Expand All @@ -35,11 +38,10 @@ require (
mvdan.cc/sh/v3 v3.4.2
)

// TODO(go.mod): Is there a reason these deps are kept separately from the
// other `require`s?
require (
github.com/bombsimon/logrusr/v2 v2.0.1
github.com/go-logr/logr v1.0.0
github.com/rhysd/actionlint v1.6.8
github.com/sirupsen/logrus v1.8.1
gotest.tools v2.2.0+incompatible
)

Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,9 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
github.com/go-logr/logr v1.0.0 h1:kH951GinvFVaQgy/ki/B3YYmQtRpExGigSJg6O8z5jo=
github.com/go-logr/logr v1.0.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
Expand Down
3 changes: 2 additions & 1 deletion log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/bombsimon/logrusr/v2"
"github.com/go-logr/logr"
"github.com/sirupsen/logrus"
"go.uber.org/zap/zapcore"
)

// TODO(log): Remove zap logic
Expand Down Expand Up @@ -98,6 +97,7 @@ func (l Level) String() string {
// TODO(log): Should we include a strict option here, which fails if the
// provided log level is not recognized or is it fine to default to
// InfoLevel?
/*
func parseLogLevelZap(level string) zapcore.Level {
switch level {
case "debug":
Expand All @@ -118,3 +118,4 @@ func parseLogLevelZap(level string) zapcore.Level {
return zapcore.InfoLevel
}
}
*/

0 comments on commit ab7c620

Please sign in to comment.