DefaultPayloadLevel is default level to use when logging payloads
const DefaultPayloadLevel = zapcore.Level(zapcore.DebugLevel - 1)
func Error(err error) zapcore.Field
func Fields(ctx context.Context) []interface{}
func ProtoMessage(key string, val interface{}) zapcore.Field
func StreamServerInterceptor(logger *zap.Logger, opts ...Option) grpc.StreamServerInterceptor
func UnaryServerInterceptor(logger *zap.Logger, opts ...Option) grpc.UnaryServerInterceptor
func WithFields(ctx context.Context, fields []zapcore.Field) context.Context
func ZapFields(ctx context.Context) []zapcore.Field
Leveler returns a zap level to use when logging from a grpc interceptor.
type Leveler interface { Level(ctx context.Context, fullMethod string) zapcore.Level }
type LevelerFunc func(ctx context.Context, fullMethod string) zapcore.Level
func (l LevelerFunc) Level(ctx context.Context, fullMethod string) zapcore.Level
func (l LevelerFunc) PayloadLevel(ctx context.Context, fullMethod string) zapcore.Level
type Option func(o *options)
func WithLeveler(l Leveler) Option
func WithPayloadLeveler(l PayloadLeveler) Option
PayloadLeveler gets the level to use when logging grpc message payloads.
type PayloadLeveler interface { PayloadLevel(ctx context.Context, fullMethod string) zapcore.Level }