suppress unnecessary stacktrace when http status code is redirect related.

This commit is contained in:
Dawn Chen 2014-12-17 18:42:11 -08:00
parent 8379966ac5
commit 71fc5940f1

View File

@ -315,6 +315,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
defer httplog.NewLogged(req, &w).StacktraceWhen(
httplog.StatusIsNot(
http.StatusOK,
http.StatusMovedPermanently,
http.StatusTemporaryRedirect,
http.StatusNotFound,
),
).Log()