package
2.0.0-alpha4+incompatible
Repository: https://github.com/aspring/traefik.git
Documentation: pkg.go.dev
# Functions
AddOriginFields add origin fields.
AddServiceFields add service fields.
GetLogData gets the request context object that contains logging data.
NewFieldHandler creates a Field handler.
NewHandler creates a new Handler.
ParseAccessLog parse line of access log and return a map with each fields.
WrapHandler Wraps access log handler into an Alice Constructor.
# Constants
ClientAddr is the map key used for the remote address in its original form (usually IP:port).
ClientHost is the map key used for the remote IP address from which the client request was received.
ClientPort is the map key used for the remote TCP port from which the client request was received.
ClientUsername is the map key used for the username provided in the URL, if present.
CommonFormat is the common logging format (CLF).
DataTableKey is the key within the request context used to store the Log Data Table.
DownstreamContentSize is the map key used for the number of bytes in the response entity returned to the client.
DownstreamStatus is the map key used for the HTTP status code returned to the client.
Duration is the map key used for the total time taken by processing the response, including the origin server's time but not the log writing time.
GzipRatio is the map key used for the response body compression ratio achieved.
JSONFormat is the JSON logging format.
OriginContentSize is the map key used for the content length specified by the origin server, or 0 if unspecified.
OriginDuration is the map key used for the time taken by the origin server ('upstream') to return its response.
OriginStatus is the map key used for the HTTP status code returned by the origin server.
Overhead is the map key used for the processing time overhead caused by Traefik.
RequestAddr is the map key used for the HTTP Host header (usually IP:port).
RequestContentSize is the map key used for the number of bytes in the request entity (a.k.a.
RequestCount is the map key used for the number of requests received since the Traefik instance started.
RequestHost is the map key used for the HTTP Host server name (not including port).
RequestMethod is the map key used for the HTTP method.
RequestPath is the map key used for the HTTP request URI, not including the scheme, host or port.
RequestPort is the map key used for the TCP port from the HTTP Host.
RequestProtocol is the map key used for the version of HTTP requested.
RequestRefererHeader is the Referer header in the request.
RequestUserAgentHeader is the User-Agent header in the request.
RetryAttempts is the map key used for the amount of attempts the request was retried.
RouterName is the map key used for the name of the Traefik router.
ServiceAddr is the map key used for the IP:port of the Traefik backend (extracted from BackendURL).
ServiceName is the map key used for the name of the Traefik backend.
ServiceURL is the map key used for the URL of the Traefik backend.
StartLocal is the map key used for the local time at which request processing started.
StartUTC is the map key used for the time at which request processing started.
# Structs
CommonLogFormatter provides formatting in the Traefik common log format.
FieldHandler sends a new field to the logger.
Handler will write each request and its response to the access log.
LogData is the data captured by the middleware so that it can be logged.
SaveRetries is an implementation of RetryListener that stores RetryAttempts in the LogDataTable.
# Type aliases
CoreLogData holds the fields computed from the request/response.
FieldApply function hook to add data in accesslog.