fabric: github.com/hyperledger/fabric/common/grpclogging Index | Files | Directories

package grpclogging

import "github.com/hyperledger/fabric/common/grpclogging"

Index

Package Files

context.go fields.go server.go

Constants

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

DefaultPayloadLevel is default level to use when logging payloads

func Error Uses

func Error(err error) zapcore.Field

func Fields Uses

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

func ProtoMessage Uses

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

func StreamServerInterceptor Uses

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

func UnaryServerInterceptor Uses

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

func WithFields Uses

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

func ZapFields Uses

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

type Leveler Uses

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

Leveler returns a zap level to use when logging from a grpc interceptor.

type LevelerFunc Uses

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

func (LevelerFunc) Level Uses

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

func (LevelerFunc) PayloadLevel Uses

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

type Option Uses

type Option func(o *options)

func WithLeveler Uses

func WithLeveler(l Leveler) Option

func WithPayloadLeveler Uses

func WithPayloadLeveler(l PayloadLeveler) Option

type PayloadLeveler Uses

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

PayloadLeveler gets the level to use when logging grpc message payloads.

Directories

PathSynopsis
fakesCode generated by counterfeiter.
testpb

Package grpclogging imports 10 packages (graph) and is imported by 3 packages. Updated 2019-02-05. Refresh now. Tools for package owners.