grpclogging

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPayloadLevel = zapcore.Level(zapcore.DebugLevel - 1)

Variables

This section is empty.

Functions

func Error

func Error(err error) zapcore.Field

func Fields

func Fields(ctx context.Context) []interface{}

func ProtoMessage

func ProtoMessage(key string, val interface{}) zapcore.Field

func StreamServerInterceptor

func StreamServerInterceptor(logger *zap.Logger, opts ...Option) grpc.StreamServerInterceptor

func UnaryServerInterceptor

func UnaryServerInterceptor(logger *zap.Logger, opts ...Option) grpc.UnaryServerInterceptor

func WithFields

func WithFields(ctx context.Context, fields []zapcore.Field) context.Context

func ZapFields

func ZapFields(ctx context.Context) []zapcore.Field

Types

type Leveler

type Leveler interface {
	Level(ctx context.Context, fullMethod string) zapcore.Level
}

type LevelerFunc

type LevelerFunc func(ctx context.Context, fullMethod string) zapcore.Level

func (LevelerFunc) Level

func (l LevelerFunc) Level(ctx context.Context, fullMethod string) zapcore.Level

func (LevelerFunc) PayloadLevel

func (l LevelerFunc) PayloadLevel(ctx context.Context, fullMethod string) zapcore.Level

type Option

type Option func(o *options)

func WithLeveler

func WithLeveler(l Leveler) Option

func WithPayloadLeveler

func WithPayloadLeveler(l PayloadLeveler) Option

type PayloadLeveler

type PayloadLeveler interface {
	PayloadLevel(ctx context.Context, fullMethod string) zapcore.Level
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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