First stage of access logging middleware. Initially without any output appenders.

This commit is contained in:
Richard Shepherd 2017-04-10 08:51:08 +01:00 committed by Timo Reimann
parent 4310bdf3ca
commit 73a1b172ed
9 changed files with 447 additions and 34 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()