Documentation ¶
Overview ¶
Package loghttp provides automatic logging functionalities to http.Client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogRequest = func(req *http.Request) { log.Printf("---> %s %s", req.Method, req.URL) }
Used if transport.LogRequest is not set.
View Source
var DefaultLogResponse = func(resp *http.Response) { log.Printf("<--- %d %s", resp.StatusCode, resp.Request.URL) }
Used if transport.LogResponse is not set.
View Source
var DefaultTransport = &Transport{ Transport: http.DefaultTransport, }
THe default logging transport that wraps http.DefaultTransport.
Functions ¶
This section is empty.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
format
|
|
Package global automatically sets http.DefaultTransport to loghttp.DefaultTransport when loaded.
|
Package global automatically sets http.DefaultTransport to loghttp.DefaultTransport when loaded. |
Click to show internal directories.
Click to hide internal directories.