19c3a5b4 by astaxie

beego: improve the router debug infomation

1 parent e635e274
...@@ -756,11 +756,13 @@ Admin: ...@@ -756,11 +756,13 @@ Admin:
756 } 756 }
757 757
758 if RunMode == "dev" { 758 if RunMode == "dev" {
759 var devinfo string
759 if findrouter { 760 if findrouter {
760 Info("beego: router defined " + routerInfo.pattern + " " + r.URL.Path + " +" + timeend.String()) 761 devinfo = fmt.Sprintf("| % -10s| % -16s | % -10s | % -40s | % -10s | % -40s |", "beego", timeend.String(), r.Method, r.URL.Path, "match", routerInfo.pattern)
761 } else { 762 } else {
762 Info("beego:" + r.URL.Path + " 404" + " +" + timeend.String()) 763 devinfo = fmt.Sprintf("| % -10s| % -16s | % -10s | % -40s | % -10s |", "beego", timeend.String(), r.Method, r.URL.Path, "notmatch")
763 } 764 }
765 Info(devinfo)
764 } 766 }
765 767
766 // Call WriteHeader if status code has been set changed 768 // Call WriteHeader if status code has been set changed
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!