when panic show the request url
Showing
1 changed file
with
2 additions
and
0 deletions
| ... | @@ -390,6 +390,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) | ... | @@ -390,6 +390,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) |
| 390 | } | 390 | } |
| 391 | } | 391 | } |
| 392 | var stack string | 392 | var stack string |
| 393 | Critical("the request url is ", r.URL.Path) | ||
| 393 | Critical("Handler crashed with error", err) | 394 | Critical("Handler crashed with error", err) |
| 394 | for i := 1; ; i++ { | 395 | for i := 1; ; i++ { |
| 395 | _, file, line, ok := runtime.Caller(i) | 396 | _, file, line, ok := runtime.Caller(i) |
| ... | @@ -411,6 +412,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) | ... | @@ -411,6 +412,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) |
| 411 | handler(rw, r) | 412 | handler(rw, r) |
| 412 | return | 413 | return |
| 413 | } else { | 414 | } else { |
| 415 | Critical("the request url is ", r.URL.Path) | ||
| 414 | Critical("Handler crashed with error", err) | 416 | Critical("Handler crashed with error", err) |
| 415 | for i := 1; ; i++ { | 417 | for i := 1; ; i++ { |
| 416 | _, file, line, ok := runtime.Caller(i) | 418 | _, file, line, ok := runtime.Caller(i) | ... | ... |
-
Please register or sign in to post a comment