loggingtransport

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(upstream http.RoundTripper, logger logging.Logger, level logging.Level) http.RoundTripper

New wraps an upstream client and logs all requests made to it.

func NewWithFilter added in v0.3.0

func NewWithFilter(upstream http.RoundTripper, logger logging.Logger, filter logging.Filter) http.RoundTripper

func Wrap added in v0.0.6

func Wrap(client *http.Client, logger logging.Logger, level logging.Level) *http.Client

Wrap a client and logs all requests made to it.

func WrapWithFilter added in v0.3.0

func WrapWithFilter(client *http.Client, logger logging.Logger, filter logging.Filter) *http.Client

Types

type LoggingTransport

type LoggingTransport struct {
	// contains filtered or unexported fields
}

LoggingTransport is a http.RoundTripper with a pluggable logger.

func (*LoggingTransport) RoundTrip

func (lt *LoggingTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL