refactor: restore "First stage of access logging middleware."

This reverts commit 82651985c4.
This commit is contained in:
Fernandez Ludovic 2017-05-09 14:02:44 +02:00
parent db09007dbc
commit d2c8824902
9 changed files with 473 additions and 30 deletions

View file

@ -13,6 +13,7 @@ import (
"time"
"github.com/containous/traefik/log"
"github.com/containous/traefik/middlewares/accesslog"
"github.com/streamrail/concurrent-map"
)
@ -133,8 +134,9 @@ func (fblh frontendBackendLoggingHandler) ServeHTTP(rw http.ResponseWriter, req
referer := req.Referer()
agent := req.UserAgent()
frontend := strings.TrimPrefix(infoRw.GetFrontend(), "frontend-")
backend := infoRw.GetBackend()
logTable := accesslog.GetLogDataTable(req)
frontend := logTable.Core[accesslog.FrontendName]
backend := logTable.Core[accesslog.BackendURL]
status := infoRw.GetStatus()
size := infoRw.GetSize()