protoc-gen-zap

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 3 Imported by: 0

README

protoc-gen-zap

Warning: this is an early version - do not use in production

Automated code generation for your protobuf objects to implement zap.ObjectMarshaler, based on lyft/protoc-gen-star

This is useful to log protobuf objects in zap without heavy reflection:

l, _ := zap.NewProduction()

l.Info("create-user",
  zap.Object("user", user)
)

Requirements

running tests

Code generation is done in the protoc flow:

go install . && protoc -I . -I ${GOPATH}/src --go_out=":./test" --zap_out="lang=go:./test" test/test.proto

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL