logging

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseContextInterceptor

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

func NewBaseContextInterceptor

func NewBaseContextInterceptor(ctx context.Context) *BaseContextInterceptor

func (*BaseContextInterceptor) StreamServerInterceptor

func (bi *BaseContextInterceptor) StreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (retErr error)

func (*BaseContextInterceptor) UnaryServerInterceptor

func (bi *BaseContextInterceptor) UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, retErr error)

type LoggingInterceptor

type LoggingInterceptor struct {
	Level log.Level
	// contains filtered or unexported fields
}

func NewLoggingInterceptor

func NewLoggingInterceptor(ctx context.Context) *LoggingInterceptor

NewLoggingInterceptor creates a new interceptor that logs method start and end. Note that the provided context is only for warnings generated by this function. It is not the root logger; that is injected by the BaseContextInterceptor.

func (*LoggingInterceptor) StreamAnnounce added in v2.10.0

func (li *LoggingInterceptor) StreamAnnounce(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (retErr error)

StreamAnnounce is a grpc stream server interceptor that announces the beginning and end of the request. It should be after the auth middleware in the interceptor chain.

func (*LoggingInterceptor) StreamSetup added in v2.10.0

func (li *LoggingInterceptor) StreamSetup(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (retErr error)

StreamSetup is a grpc stream server interceptor that sets up the grpc request for logging. It should be near the top of the interceptor chain.

func (*LoggingInterceptor) UnaryAnnounce added in v2.10.0

func (li *LoggingInterceptor) UnaryAnnounce(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, retErr error)

UnaryAnnounce is a grpc unary server interceptor that announces the beginning and end of the request. It should be after the auth middleware in the interceptor chain.

func (*LoggingInterceptor) UnarySetup added in v2.10.0

func (li *LoggingInterceptor) UnarySetup(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, retErr error)

UnarySetup is a grpc unary server interceptor that sets up the grpc request for logging. It should be near the top of the interceptor chain.

Directories

Path Synopsis
Package client contains GRPC client interceptors for logging.
Package client contains GRPC client interceptors for logging.

Jump to

Keyboard shortcuts

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