Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tulir/zerozap
A zap core to convert output to zerolog
https://github.com/tulir/zerozap
golang structured-logging zap zerolog
Last synced: about 1 month ago
JSON representation
A zap core to convert output to zerolog
- Host: GitHub
- URL: https://github.com/tulir/zerozap
- Owner: tulir
- License: mpl-2.0
- Created: 2024-05-03T18:53:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-04T11:10:06.000Z (9 months ago)
- Last Synced: 2024-10-28T09:56:10.003Z (3 months ago)
- Topics: golang, structured-logging, zap, zerolog
- Language: Go
- Homepage: https://go.mau.fi/zerozap
- Size: 23.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zerozap
An implementation of [zapcore.Core](https://pkg.go.dev/go.uber.org/zap/zapcore#Core)
to feed all data to a [zerolog](https://github.com/rs/zerolog) logger.## Basic example
```go
package mainimport (
"os""github.com/rs/zerolog"
"go.mau.fi/zerozap"
"go.uber.org/zap"
)func main() {
mainLog := zerolog.New(os.Stdout)
zapLogger := zap.New(zerozap.New(mainLog))
zapLogger.Info("Hello, world!")
}
```