Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aybabtme/log

Structured logger.
https://github.com/aybabtme/log

Last synced: about 1 month ago
JSON representation

Structured logger.

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!")
```