Documentation
¶
Overview ¶
Package accesslog writes proxy activity as JSON Lines.
Index ¶
Constants ¶
View Source
const ( // EventRequest identifies the response sent by the proxy to a client. EventRequest = "request" // EventUpstream identifies one HTTP exchange with an upstream service. EventUpstream = "upstream" )
Variables ¶
This section is empty.
Functions ¶
func URLWithoutSecrets ¶
URLWithoutSecrets returns a URL without user information, query values, or fragments.
Types ¶
type Entry ¶
type Entry struct {
Time time.Time `json:"time"`
Event string `json:"event"`
RequestID string `json:"request_id,omitempty"`
Method string `json:"method"`
Path string `json:"path,omitempty"`
URL string `json:"url,omitempty"`
StatusCode int `json:"status_code,omitempty"`
DurationMS int64 `json:"duration_ms"`
RemoteAddr string `json:"remote_addr,omitempty"`
Error string `json:"error,omitempty"`
}
Entry is one proxy activity record.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger appends complete JSON objects to a file, one per line.
Click to show internal directories.
Click to hide internal directories.