From 57781d10014efccf3e7a1e927c79ae9b27419fae Mon Sep 17 00:00:00 2001 From: astaxie Date: Sat, 21 Dec 2013 01:20:35 +0800 Subject: [PATCH] when panic show the request url --- router.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/router.go b/router.go index 695f981a..ea307404 100644 --- a/router.go +++ b/router.go @@ -390,6 +390,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) } } var stack string + Critical("the request url is ", r.URL.Path) Critical("Handler crashed with error", err) for i := 1; ; i++ { _, file, line, ok := runtime.Caller(i) @@ -411,6 +412,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) handler(rw, r) return } else { + Critical("the request url is ", r.URL.Path) Critical("Handler crashed with error", err) for i := 1; ; i++ { _, file, line, ok := runtime.Caller(i)