Documentation
¶
Overview ¶
Package logx is extension for log package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHttpAccessLogger ¶
NewHttpAccessLogger returns a http.Handler that generates the following access log when using textHandler INFO 2019-01-05T18:04:03-08:00 /foo status=200 size=3 method=GET duration=4.225µs refer= If you need more customization, you should create a new struct
Types ¶
type HttpAccessLogger ¶
type HttpAccessLogger struct {
// contains filtered or unexported fields
}
HttpAccessLogger is an example for how to use gommon/log for http access log
func (*HttpAccessLogger) ServeHTTP ¶
func (ac *HttpAccessLogger) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler interface
Click to show internal directories.
Click to hide internal directories.