Stop logging stack traces for 4xx requests

This commit is contained in:
Clayton Coleman 2015-03-03 21:13:09 -05:00
parent 3beea3b660
commit 576bbb565e

View File

@ -74,7 +74,7 @@ func (passthroughLogger) Addf(format string, data ...interface{}) {
// DefaultStacktracePred is the default implementation of StacktracePred.
func DefaultStacktracePred(status int) bool {
return (status < http.StatusOK || status >= http.StatusBadRequest) && status != http.StatusSwitchingProtocols
return (status < http.StatusOK || status >= http.StatusInternalServerError) && status != http.StatusSwitchingProtocols
}
// NewLogged turns a normal response writer into a logged response writer.