make
ln -s $(pwd)/dist/zap-cli /usr/local/bin/zap-cli
Usage / Examples
$ go run ./examples/test.go
{"level":"\u001b[35mDEBUG\u001b[0m","time":"2022-06-07T08:19:31+03:00","message":"Failed to fetch URL","url":"https://github.com/stefanoschrs/zap-cli","attempt":3}
{"level":"\u001b[34mINFO\u001b[0m","time":"2022-06-07T08:19:31+03:00","message":"Failed to fetch URL"}
$ go run ./examples/test.go | zap-cli
2022-06-07T08:19:33+03:00 DEBUG Failed to fetch URL {"attempt":3,"url":"https://github.com/stefanoschrs/zap-cli"}
2022-06-07T08:19:33+03:00 INFO Failed to fetch URL