Skip to content

Commit

Permalink
services/horizon: Remove level=warn logs for known errors (#3788)
Browse files Browse the repository at this point in the history
This commit remove some logging changes introduced in 3f55f73.

I was hoping to still be able to see `bad connection` errors in the logs but
with `warn` level however that are many other known errors which are propagated
down to `render` package causing extensive `warn` logging.
  • Loading branch information
bartekn authored Jul 29, 2021
1 parent 61bc28b commit 7a67fed
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions support/render/problem/problem.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ const (
// LogNoErrors indicates that the Problem instance should not log any errors
LogNoErrors = LogFilter(iota)
// LogUnknownErrors indicates that the Problem instance should only log errors
// which are not registered with level=error but will also log known errors with
// level=warn.
// which are not registered
LogUnknownErrors = LogFilter(iota)
// LogAllErrors indicates that the Problem instance should log all errors
LogAllErrors = LogFilter(iota)
Expand Down Expand Up @@ -188,8 +187,6 @@ func (ps *Problem) Render(ctx context.Context, w http.ResponseWriter, err error)
ps.reportFn(ctx, err)
}
problem = ServerError
} else if ps.filter == LogUnknownErrors {
ps.log.Ctx(ctx).WithStack(err).Warn(err)
}
}

Expand Down

0 comments on commit 7a67fed

Please sign in to comment.