Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromRequest ¶
FromRequest is a helper for extracting the logger from an *http.Request.
func NewMiddleware ¶
NewMiddleware generates an HTTP middleware with the given options set.
func NewTransport ¶ added in v1.4.0
func NewTransport(logger logevent.Logger) func(http.RoundTripper) http.RoundTripper
NewTransport wraps a `transport.Decorator` in a new one that injects a `logevent.Logger` into the context.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware wraps an http.Handler and injects a logevent.Logger in to the context.
func (*Middleware) ServeHTTP ¶
func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.