Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aybabtme/log
Structured logger.
https://github.com/aybabtme/log
Last synced: about 1 month ago
JSON representation
Structured logger.
- Host: GitHub
- URL: https://github.com/aybabtme/log
- Owner: aybabtme
- License: mit
- Created: 2015-10-26T21:49:28.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-18T13:11:45.000Z (over 7 years ago)
- Last Synced: 2024-06-19T16:47:37.550Z (5 months ago)
- Language: Go
- Homepage: https://godoc.org/github.com/aybabtme/log
- Size: 1.95 KB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Structured logger
Bare minimum structured logger.
* Logs in JSON.
* 3 log levels: info, error, fatal.
* Reusable context logging```go
ll := log.KV("who", "world")
ll.Info("hello?")if err := doThing(); err != nil {
ll.Err(err).Error("this thing failed")
}
ll.KV("why", "no reason").Fatal("abort abort abort!")
```