Merge pull request #7289 from kazegusuri/logging

lower log level on recovering from panic
pull/6/head
Robert Bailey 2015-04-24 09:22:46 -07:00
commit 137c90738e
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(

View File

@ -66,7 +66,7 @@ func logPanic(r interface{}) {
}
callers = callers + fmt.Sprintf("%v:%v\n", file, line)
}
glog.Infof("Recovered from panic: %#v (%v)\n%v", r, r, callers)
glog.Errorf("Recovered from panic: %#v (%v)\n%v", r, r, callers)
}
// ErrorHandlers is a list of functions which will be invoked when an unreturnable