logging

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 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) StreamServerInterceptor

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

func (*LoggingInterceptor) UnaryServerInterceptor

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

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