Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromSimpleLogger ¶
func FromSimpleLogger(writer SimpleLogWriter, parent http.RoundTripper) http.RoundTripper
FromSimpleLogger creates new logging RoundTripper instance with given log writer
func NewRoundTripper ¶
func NewRoundTripper(out io.Writer, parent http.RoundTripper) http.RoundTripper
NewRoundTripper returns new RoundTripper instance for logging http request and response
Types ¶
type LogWriter ¶
type LogWriter interface { PrintRequest(req *RequestLog) PrintResponse(resp *ResponseLog) }
LogWriter is interface for writing logs
type RequestLog ¶
RequestLog contains http(s) request information
type ResponseLog ¶
ResponseLog contains http(s) response information or errors
type SimpleLogWriter ¶
type SimpleLogWriter interface {
Print(v ...interface{})
}
SimpleLogWriter is interface for writing logs
Click to show internal directories.
Click to hide internal directories.