Documentation
¶
Overview ¶
Package logging provides a fast, asynchronous request logger which outputs NCSA/Apache combined logs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggingHandler ¶
type LoggingHandler struct {
// contains filtered or unexported fields
}
A LoggingHandler is a HTTP handler which proxies requests to an underlying handler and logs the results.
func Wrap ¶
func Wrap(h http.Handler, w io.Writer) *LoggingHandler
Wrap returns the underlying handler, wrapped in a LoggingHandler which will write to the given Writer. N.B.: You must call Start() on the result before using it.
func (*LoggingHandler) ServeHTTP ¶
func (al *LoggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*LoggingHandler) Start ¶
func (al *LoggingHandler) Start()
Start creates a goroutine to handle the logging IO.
func (*LoggingHandler) Stop ¶
func (al *LoggingHandler) Stop()
Stop closes the internal channel used to buffer log statements and waits for the IO goroutine to complete.
Click to show internal directories.
Click to hide internal directories.