logger

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientLoggingInterceptor

func ClientLoggingInterceptor(
	ctx context.Context,
	method string,
	req,
	reply any,
	cc *grpc.ClientConn,
	invoker grpc.UnaryInvoker,
	opts ...grpc.CallOption,
) error

func ClientRequestIDInterceptor

func ClientRequestIDInterceptor(
	ctx context.Context,
	method string,
	req,
	reply any,
	cc *grpc.ClientConn,
	invoker grpc.UnaryInvoker,
	opts ...grpc.CallOption,
) error

func ClientStreamInterceptor

func ClientStreamInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)

func ServerLoggingInterceptor

func ServerLoggingInterceptor(
	ctx context.Context,
	req any,
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler,
) (any, error)

func ServerRequestIDInterceptor

func ServerRequestIDInterceptor(
	ctx context.Context,
	req any,
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler,
) (any, error)

func ServerStreamLoggingInterceptor

func ServerStreamLoggingInterceptor(
	srv any,
	ss grpc.ServerStream,
	info *grpc.StreamServerInfo,
	handler grpc.StreamHandler,
) error

func ServerStreamRequestIDInterceptor

func ServerStreamRequestIDInterceptor(
	srv any,
	ss grpc.ServerStream,
	info *grpc.StreamServerInfo,
	handler grpc.StreamHandler,
) error

Types

type LogLevel added in v0.0.4

type LogLevel string
const (
	LogLevelInfo  LogLevel = "INFO"
	LogLevelDebug LogLevel = "DEBUG"
	LogLevelTrace LogLevel = "TRACE"
	LogLevelError LogLevel = "ERROR"
	LogLevelWarn  LogLevel = "WARN"
	LogLevelFatal LogLevel = "FATAL"
	LogLevelPanic LogLevel = "PANIC"
)

func (LogLevel) String added in v0.0.4

func (s LogLevel) String() string

func (LogLevel) ToLogrusLevel added in v0.0.4

func (s LogLevel) ToLogrusLevel() logrus.Level

func (*LogLevel) UnmarshalText added in v0.0.4

func (s *LogLevel) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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