grpc_logger

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDeciderMethod

func DefaultDeciderMethod(fullMethodName string, err error) bool

DefaultDeciderMethod is the default implementation of decider to see if you should log the call by default this if always true so all calls are logged

func DefaultErrorToCode

func DefaultErrorToCode(err error) codes.Code

Types

type ClientPayloadLoggingDecider

type ClientPayloadLoggingDecider func(ctx context.Context, fullMethodName string) bool

ClientPayloadLoggingDecider is a user-provided function for deciding whether to log the client-side request/response payloads

type Decider

type Decider func(fullMethodName string, err error) bool

Decider function defines rules for suppressing any interceptor logs

type ErrorToCode

type ErrorToCode func(err error) codes.Code

ErrorToCode function determines the error code of an error This makes using custom errors with grpc middleware easier

type JsonPbMarshaler

type JsonPbMarshaler interface {
	Marshal(out io.Writer, pb proto.Message) error
}

JsonPbMarshaler JsonPbMarshaller is a marshaller that serializes protobuf messages.

type ServerPayloadLoggingDecider

type ServerPayloadLoggingDecider func(ctx context.Context, fullMethodName string, servingObject interface{}) bool

ServerPayloadLoggingDecider is a user-provided function for deciding whether to log the server-side request/response payloads

Directories

Path Synopsis
`grpc_logrus` is a gRPC logging middleware backed by Logrus loggers
`grpc_logrus` is a gRPC logging middleware backed by Logrus loggers

Jump to

Keyboard shortcuts

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