logging

package
v0.0.0-...-9ff9bfb Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnaryInterceptor

func UnaryInterceptor(options ...Option) grpc.UnaryServerInterceptor

Types

type ErrDetailObjectMarshaler

type ErrDetailObjectMarshaler struct {
	// contains filtered or unexported fields
}

func (ErrDetailObjectMarshaler) MarshalLogObject

func (e ErrDetailObjectMarshaler) MarshalLogObject(encoder zapcore.ObjectEncoder) error

type Option

type Option func(*loggingOptions)

func WithErrorHandler

func WithErrorHandler(handler func(ctx context.Context, err error) []zapcore.Field) Option

func WithOperationCompleted

func WithOperationCompleted(enable bool) Option

func WithOperationStarted

func WithOperationStarted(enable bool) Option

func WithRequestExtractor

func WithRequestExtractor(extractor func(ctx context.Context, req interface{}) (context.Context, zapcore.ObjectMarshaler, error)) Option

func WithResponseExtractor

func WithResponseExtractor(extractor func(ctx context.Context, resp interface{}) zapcore.ObjectMarshaler) Option

Jump to

Keyboard shortcuts

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