Documentation
¶
Overview ¶
Package logginghttp provides net/http access log middleware built on top of the logging package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccessLogMiddleware ¶
func NewAccessLogMiddleware(baseLogger *logging.Logger, config AccessLogConfig) func(http.Handler) http.Handler
NewAccessLogMiddleware returns a net/http access log middleware.
Types ¶
type AccessLogConfig ¶
type AccessLogConfig struct {
RequestIDHeader string
SkipPaths []string
SkipPathRegexps []*regexp.Regexp
Skipper func(*http.Request) bool
DefaultLevel logging.Level
ClientErrorLevel logging.Level
ServerErrorLevel logging.Level
PathLevels map[string]logging.Level
RecoverPanic bool
LogPanicStack bool
TrustProxyHeaders bool
MaxRequestFieldCount int
MaxRequestMessageCount int
MaxRequestErrorCount int
}
AccessLogConfig controls HTTP access logging.
Click to show internal directories.
Click to hide internal directories.