package
0.0.0-20200609095714-edc8019f93cc
Repository: https://github.com/mwitkow/go-httpwares.git
Documentation: pkg.go.dev
# Packages
ctxlogrus allows you to store or extract a logrus logger from the context.
# Functions
AsHttpLogger returns the given logrus instance as an HTTP logger.
ContentCaptureMiddleware is a server-side http ware for logging contents of HTTP requests and responses (body and headers).
ContentCaptureTripperware is a client-side http ware for logging contents of HTTP requests and responses (body and headers).
DefaultMiddlewareCodeToLevel is the default of a mapper between HTTP server-side status codes and logrus log levels.
DefaultTripperwareCodeToLevel is the default of a mapper between HTTP client-side status codes and logrus log levels.
Middleware is a server-side http ware for logging using logrus.
Tripperware is a server-side http ware for logging using logrus.
WithConnectivityErrorLevel customizes.
WithDecider customizes the function for deciding if the middleware logs at the end of the request.
WithLevels customizes the function that maps HTTP client or server side status codes to log levels.
WithRequestBodyCapture enables recording of request body pre-handling/pre-call.
WithRequestFieldExtractor adds a field, allowing you to customize what fields get populated from the request.
WithResponseBodyCapture enables recording of response body post-handling/post-call.
WithRequestFieldExtractor adds a field, allowing you to customize what fields get populated from the response.
# Variables
SystemField is used in every log statement made through http_logrus.
# Type aliases
CodeToLevel user functions define the mapping between HTTP status codes and logrus log levels.
Decider function defines rules for suppressing any interceptor logs.
No description provided by the author
RequestFieldExtractorFunc is a signature of user-customizable functions for extracting log fields from requests.
ResponseFieldExtractorFunc is a signature of user-customizable functions for extracting log fields from responses.