rlogger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggerType      = ctxLogger("type")
	LoggerSpanID    = ctxLogger("spanID")
	LoggerFlowID    = ctxLogger("flowID")
	LoggerTranID    = ctxLogger("tranID")
	LoggerReqID     = ctxLogger("reid")
	LoggerAdapterID = ctxLogger("adapterID")
	LoggerPartnerID = ctxLogger("partnerID")
	LoggerWorkerID  = ctxLogger("workerID")
)

Variables

Functions

func New

func New() *glog

Types

type Logger

type Logger interface {
	Infof(format string, v ...interface{})
	Debugf(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Errorf(format string, v ...interface{})
	Panicf(format string, v ...interface{})

	InfoWithContext(ctx context.Context, format string, v ...interface{})
	DebugWithContext(ctx context.Context, format string, v ...interface{})
	WarnWithContext(ctx context.Context, format string, v ...interface{})
	ErrorWithContext(ctx context.Context, format string, v ...interface{})
	PanicWithContext(ctx context.Context, format string, v ...interface{})

	WithField(field string, value interface{}) Logger
	WithFieldNoAdds(field string, value interface{}) Logger
	Close() error
}

Logger is an interface of logging operations

Jump to

Keyboard shortcuts

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