mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:20:59 +00:00
beego: improve the router debug infomation
This commit is contained in:
parent
e635e274d4
commit
19c3a5b41c
@ -756,11 +756,13 @@ Admin:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if RunMode == "dev" {
|
if RunMode == "dev" {
|
||||||
|
var devinfo string
|
||||||
if findrouter {
|
if findrouter {
|
||||||
Info("beego: router defined " + routerInfo.pattern + " " + r.URL.Path + " +" + timeend.String())
|
devinfo = fmt.Sprintf("| % -10s| % -16s | % -10s | % -40s | % -10s | % -40s |", "beego", timeend.String(), r.Method, r.URL.Path, "match", routerInfo.pattern)
|
||||||
} else {
|
} else {
|
||||||
Info("beego:" + r.URL.Path + " 404" + " +" + timeend.String())
|
devinfo = fmt.Sprintf("| % -10s| % -16s | % -10s | % -40s | % -10s |", "beego", timeend.String(), r.Method, r.URL.Path, "notmatch")
|
||||||
}
|
}
|
||||||
|
Info(devinfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call WriteHeader if status code has been set changed
|
// Call WriteHeader if status code has been set changed
|
||||||
|
Loading…
Reference in New Issue
Block a user