Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TimeFormat is the time format for logging. TimeFormat = time.RFC3339Nano )
Variables ¶
This section is empty.
Functions ¶
func NewAccessLogger ¶
NewAccessLogger returns a constructed AccessLogger pointer.
Types ¶
type AccessLogger ¶
type AccessLogger struct {
// contains filtered or unexported fields
}
AccessLogger writes an NCSA combined-ish log record. Note this skips the rfc931 ident field and username as we aren't supporting either of those AFAIU. It also adds an elapsed time, and UTC time to Nanosecond precision in RFC3339 format.
func (*AccessLogger) ServeHTTP ¶
func (al *AccessLogger) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP makes our type a http.HandlerFunc.
Click to show internal directories.
Click to hide internal directories.