Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sandipb/zap-examples
- Owner: sandipb
- License: mit
- Created: 2018-05-02T17:50:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-30T18:06:04.000Z (over 6 years ago)
- Last Synced: 2024-09-29T21:21:26.512Z (about 2 months ago)
- Topics: golang, golang-examples, zap
- Language: Go
- Size: 11.7 KB
- Stars: 96
- Watchers: 3
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)