Simple logging middleware.
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples add log.Error() call for 5xx Sep 20, 2014
Readme.md
logger.go add log.Warning for 4xx Mar 10, 2015

Readme.md

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