Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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 main

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