1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-06 05:50:19 +00:00

Merge pull request #1782 from JessonChan/some_wip

BeeLogger can be the writer of  http server's log
This commit is contained in:
astaxie
2016-03-14 14:47:29 +08:00
3 changed files with 21 additions and 2 deletions

View File

@ -802,9 +802,9 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
p.execFilter(context, FinishRouter, urlPath)
Admin:
timeDur := time.Since(startTime)
//admin module record QPS
if BConfig.Listen.EnableAdmin {
timeDur := time.Since(startTime)
if FilterMonitorFunc(r.Method, r.URL.Path, timeDur) {
if runRouter != nil {
go toolbox.StatisticsMap.AddStatistics(r.Method, r.URL.Path, runRouter.Name(), timeDur)
@ -815,6 +815,7 @@ Admin:
}
if BConfig.RunMode == DEV || BConfig.Log.AccessLogs {
timeDur := time.Since(startTime)
var devInfo string
if findRouter {
if routerInfo != nil {