Documentation ¶
Index ¶
- func New(upstream http.RoundTripper, logger logger.Logger, level logging.Level) http.RoundTripper
- func NewWithFilter(upstream http.RoundTripper, logger logger.Logger, filter logging.Filter) http.RoundTripper
- func Wrap(client *http.Client, logger logger.Logger, level logging.Level) *http.Client
- func WrapWithFilter(client *http.Client, logger logger.Logger, filter logging.Filter) *http.Client
- type LoggingTransport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(upstream http.RoundTripper, logger logger.Logger, level logging.Level) http.RoundTripper
New wraps an upstream client and logs all requests made.
func NewWithFilter ¶ added in v0.3.0
func NewWithFilter(upstream http.RoundTripper, logger logger.Logger, filter logging.Filter) http.RoundTripper
NewWithFilter wraps an upstream client and logs requests made according to the filter.
Types ¶
type LoggingTransport ¶
type LoggingTransport struct {
// contains filtered or unexported fields
}
LoggingTransport is a http.RoundTripper with a pluggable logger.
Click to show internal directories.
Click to hide internal directories.