Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sandipb/zap-examples

Examples of using Uber's zap Go logging library
https://github.com/sandipb/zap-examples

golang golang-examples zap

Last synced: about 1 month ago
JSON representation

Examples of using Uber's zap Go logging library

Awesome Lists containing this project

README

        

# Using the zap logging library

This repository provides some examples of using [Uber's zap](https://github.com/uber-go/zap) Go logging library

Install the zap library before trying out the examples:

```console
$ source env.sh

$ go get -u go.uber.org/zap

$ go run src/simple1/main.go
```

## Examples

* [Simplest usage using presets](./src/simple1)
* [Creating a custom logger](./src/customlogger)
* [Using the global logger](./src/globallogger)
* [Creating custom encoders for metadata fields](./src/customencoder)