logger

package
v0.0.0-...-be21ac7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2015 License: MIT Imports: 4 Imported by: 0

README

logger

Simple logging middleware.

View the docs.

2014-09-19 19:10:31 [INFO] >> GET /
2014-09-19 19:10:31 [INFO] << GET / 200 (11B) in 239.285us
2014-09-19 19:10:32 [INFO] >> GET /
2014-09-19 19:10:32 [INFO] << GET / 200 (11B) in 34.189us
2014-09-19 19:10:33 [INFO] >> GET /yahoo
2014-09-19 19:10:34 [INFO] << GET /yahoo 200 (267KB) in 1.111522797s
2014-09-19 19:10:36 [INFO] >> GET /
2014-09-19 19:10:36 [INFO] << GET / 200 (11B) in 36.678us
2014-09-19 19:10:38 [INFO] >> GET /error
2014-09-19 19:10:38 [ERROR] << GET /error 500 (4B) in 36.553us

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() func(http.Handler) http.Handler

New logger middleware.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger middleware.

func (*Logger) ServeHTTP

func (l *Logger) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implementation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL