Documentation ¶
Overview ¶
Package debuglog provides a RoundTripper you can put into an HTTP client Transport to log requests made with that client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MaxBody int // Limit payloads to this many bytes. 0=unlimited Debugf func(string, ...interface{}) // This is where logs go. Caller Caller // This can be used for byte counters. }
Config is the input data for the logger.
type LoggingRoundTripper ¶
type LoggingRoundTripper struct {
// contains filtered or unexported fields
}
LoggingRoundTripper allows us to use a datacounter to log http request data.
func NewLoggingRoundTripper ¶
func NewLoggingRoundTripper(config Config, next http.RoundTripper) *LoggingRoundTripper
NewLoggingRoundTripper returns a round tripper to log requests counts and response sizes.
Click to show internal directories.
Click to hide internal directories.