Skip to content

About

Implementation of `grpclog.LoggerV2` interface using `zerolog`

Resources

Stars

40 stars

Watchers

3 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

grpc-zerolog

grpc-zerolog is a simple implementation of grpclog.LoggerV2 interface using zerolog. Use this to log the internal actions of a gRPC server or client.

Usage

Add the following before you grpc.Dial either a client or server.

logger := zerolog.New(os.Stdout).With().Timestamp().Logger()
logger = logger.With().Str("component", "client-grpc").Logger()

grpclog.SetLoggerV2(grpczerolog.New(logger))

Start your server/client with the following environment variable.

GRPC_GO_LOG_VERBOSITY_LEVEL=debug bin/grpc-server

This was extracted from a project so I'll add features as they're needed.

About

Implementation of `grpclog.LoggerV2` interface using `zerolog`

Resources

Stars

40 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages

⌂ 换网址