modulepackage
0.0.0-20160412232724-580d0d49f0d3
Repository: https://github.com/go-web/httplog.git
Documentation: pkg.go.dev
# Functions
ApacheCombinedFormat returns a middleware that logs http requests to the given logger using the Apache Combined log format.
ApacheCommonFormat returns a middleware that logs http requests to the given logger using the Apache Common log format.
DefaultFormat returns a middleware that logs http requests to the given logger using the default log format.
Error associates message v with the request context.
Errorf associates message v with the request context.
Errorln associates message v with the request context.
NewResponseWriter creates and initializes a new ResponseWriter.
UseXForwardedFor parses the first value from the X-Forwarded-For header and updates the request RemoteAddr field with it, then call the next handler and reverts the value back at the end.
# Variables
ErrorID is the key used for storing and retrieving errors to/from context.
# Structs
ResponseWriter is an http.ResponseWriter + ResponseRecorder.
# Interfaces
The ResponseRecorder interface is implemented by ResponseWriters that can record the response status code and bytes written to the client.
# Type aliases
ErrorType is the type used for storing error in a context.Context.