github.com/meowgorithm/babylogger
Package babylogger is a simple HTTP logging middleware. It works with any multiplexer compatible with the Go standard library. When a terminal is present it will log using nice colors. When the output is not in a terminal (for example in logs) ANSI escape sequences (read: colors) will be stripped from the output. Also note that for accurate response time logging Babylogger should be the first middleware called. Windows support is not currently implemented, however it would be trivial enough with the help of a couple packages from Mattn: http://github.com/mattn/go-isatty and https://github.com/mattn/go-colorable Example using the standard library: Example with Goji:
proxy.golang.org
v1.2.1
almost 3 years ago
7
6
8
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/meowgorithm/babylogger
spec |
| License | MIT |
| Namespace | github.com/meowgorithm |
| First Release | over 7 years ago |
| Last Synced | 25 days ago |