logging

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCodeToLevel

func DefaultCodeToLevel(code codes.Code) hclog.Level

func StreamClientInterceptor

func StreamClientInterceptor(logger hclog.Logger, opts ...Option) grpc.StreamClientInterceptor

StreamClientInterceptor returns a new streaming client interceptor that logs the execution of gRPC calls.

func UnaryClientInterceptor

func UnaryClientInterceptor(logger hclog.Logger, opts ...Option) grpc.UnaryClientInterceptor

UnaryClientInterceptor returns a new unary client interceptor that logs the execution of gRPC calls.

Types

type CodeToLevel

type CodeToLevel func(code codes.Code) hclog.Level

CodeToLevel function defines the mapping between gRPC return codes and hclog level.

type Option

type Option func(*options)

func WithStatusCodeToLevelFunc

func WithStatusCodeToLevelFunc(fn CodeToLevel) Option

Jump to

Keyboard shortcuts

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