Skip to content

Commit

Permalink
Lower loglevel of http-access messages to debug to avoid log spamming (
Browse files Browse the repository at this point in the history
  • Loading branch information
IljaN authored Nov 18, 2020
1 parent 0ada3a0 commit 667197a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/grpc/interceptors/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewUnary() grpc.UnaryServerInterceptor {
if code != codes.OK {
event = log.Error()
} else {
event = log.Info()
event = log.Debug()
}

event.Str("user-agent", userAgent).
Expand Down
2 changes: 1 addition & 1 deletion internal/http/interceptors/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func writeLog(log *zerolog.Logger, req *http.Request, url url.URL, ts time.Time,
var event *zerolog.Event
switch {
case status < 400:
event = log.Info()
event = log.Debug()
case status < 500:
event = log.Warn()
default:
Expand Down
2 changes: 1 addition & 1 deletion internal/http/services/dataprovider/dataprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (s *svc) setHandler() error {

s.handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log := appctx.GetLogger(r.Context())
log.Info().Msgf("dataprovider routing: path=%s", r.URL.Path)
log.Debug().Msgf("dataprovider routing: path=%s", r.URL.Path)

method := r.Method
// https://github.com/tus/tus-resumable-upload-protocol/blob/master/protocol.md#x-http-method-override
Expand Down

0 comments on commit 667197a

Please sign in to comment.