lower log level on recovering from panic

This commit is contained in:
Masahiro Sano
2015-04-24 22:09:14 +09:00
parent 159a58ddfb
commit 7c371ee36e
2 changed files with 2 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ func RecoverPanics(handler http.Handler) http.Handler {
defer func() {
if x := recover(); x != nil {
http.Error(w, "apis panic. Look in log for details.", http.StatusInternalServerError)
glog.Infof("APIServer panic'd on %v %v: %v\n%s\n", req.Method, req.RequestURI, x, debug.Stack())
glog.Errorf("APIServer panic'd on %v %v: %v\n%s\n", req.Method, req.RequestURI, x, debug.Stack())
}
}()
defer httplog.NewLogged(req, &w).StacktraceWhen(