1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 20:00:54 +00:00

beego: update the debug info rules

This commit is contained in:
astaxie 2014-08-18 14:35:39 +08:00
parent 8b8638c507
commit 986e91b7d6

View File

@ -591,6 +591,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
serverStaticRouter(context) serverStaticRouter(context)
if w.started { if w.started {
findrouter = true
goto Admin goto Admin
} }
@ -769,9 +770,9 @@ Admin:
if RunMode == "dev" { if RunMode == "dev" {
var devinfo string var devinfo string
if findrouter { if findrouter {
devinfo = fmt.Sprintf("| % -10s| % -16s | % -10s | % -40s | % -10s | % -40s |", "beego", timeend.String(), r.Method, r.URL.Path, "match", routerInfo.pattern) devinfo = fmt.Sprintf("| % -10s | % -40s | % -16s | % -10s | % -40s |", r.Method, r.URL.Path, timeend.String(), "match", routerInfo.pattern)
} else { } else {
devinfo = fmt.Sprintf("| % -10s| % -16s | % -10s | % -40s | % -10s |", "beego", timeend.String(), r.Method, r.URL.Path, "notmatch") devinfo = fmt.Sprintf("| % -10s | % -40s | % -16s | % -10s |", r.Method, r.URL.Path, timeend.String(), "notmatch")
} }
Debug(devinfo) Debug(devinfo)
} }