Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpillora/requestlog
Simple request logging in Go (golang)
https://github.com/jpillora/requestlog
Last synced: 2 months ago
JSON representation
Simple request logging in Go (golang)
- Host: GitHub
- URL: https://github.com/jpillora/requestlog
- Owner: jpillora
- License: mit
- Created: 2015-07-08T10:32:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-01T10:32:07.000Z (about 1 year ago)
- Last Synced: 2024-10-14T11:41:24.776Z (3 months ago)
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 6
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# requestlog
Simple request logging in Go (Golang)
### Install
``` sh
$ go get -v github.com/jpillora/requestlog/v2
```### Usage
``` go
h := http.Handler(...)
h = requestlog.Wrap(h)
```And you'll see something like:
```
2015/07/08 21:43:03.063 GET /a 200 90ms 912B
2015/07/08 21:43:03.148 GET /b 200 80ms 320B
2015/07/08 21:43:03.242 GET /c 200 90ms 116B
2015/07/08 21:43:03.320 GET /d 200 73ms 2B
2015/07/08 21:43:03.399 GET /e 200 74ms 2B
2015/07/08 21:43:03.476 GET /f 200 72ms 2B
2015/07/08 21:43:03.558 GET /g 200 77ms 2B
```#### MIT License
Copyright © 2015 Jaime Pillora <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.