logging

package
v0.8.14 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel  = "debug"
	WarnLevel   = "warn"
	ErrorLevel  = "error"
	DPanicLevel = "dpanic"
	PanicLevel  = "panic"
	FatalLevel  = "fatal"
	InfoLevel   = "info"
)

Variables

This section is empty.

Functions

func GetGrpLogDefaultVerbosity

func GetGrpLogDefaultVerbosity() int

func GetHealthMutedDecider

func GetHealthMutedDecider(muted bool) grpcLogging.Decider

func GetLogger

func GetLogger() *zap.Logger

GetLogger returns the global set logger, or fatals if one is not set.

func GrpcCodeToLevel

func GrpcCodeToLevel(code codes.Code) zapcore.Level

GrpcCodeToLevel is the default implementation of gRPC return codes and interceptor log level for server side.

func NewLogger

func NewLogger(env string) (*zap.Logger, error)

NewLogger returns a new Zap logger, changing the config based on the environment provided, and returning an error if there is an issue with creation.

func SetLogger

func SetLogger(logger *zap.Logger)

SetLogger sets the global logger to the one passed to the function.

func SetupLogger

func SetupLogger()

Types

This section is empty.

Jump to

Keyboard shortcuts

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