logging

package
v0.0.0-...-9e6572e Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithLogger

func ContextWithLogger(ctx context.Context, l Logger) context.Context

ContextWithLogger adds logger to context

func Debug

func Debug(ctx context.Context, args ...interface{})

func Debugf

func Debugf(ctx context.Context, format string, args ...interface{})

func Error

func Error(ctx context.Context, args ...interface{})

func Errorf

func Errorf(ctx context.Context, format string, args ...interface{})

func Fatal

func Fatal(ctx context.Context, args ...interface{})

func Fatalf

func Fatalf(ctx context.Context, format string, args ...interface{})

func Info

func Info(ctx context.Context, args ...interface{})

func Infof

func Infof(ctx context.Context, format string, args ...interface{})

func Panic

func Panic(ctx context.Context, args ...interface{})

func Panicf

func Panicf(ctx context.Context, format string, args ...interface{})

func Trace

func Trace(ctx context.Context, args ...interface{})

func Tracef

func Tracef(ctx context.Context, format string, args ...interface{})

func Warnf

func Warnf(ctx context.Context, format string, args ...interface{})

func Warning

func Warning(ctx context.Context, args ...interface{})

func Warningf

func Warningf(ctx context.Context, format string, args ...interface{})

func WithError

func WithError(ctx context.Context, err error) *logrus.Entry

func WithField

func WithField(ctx context.Context, key string, value interface{}) *logrus.Entry

func WithFields

func WithFields(ctx context.Context, fields logrus.Fields) *logrus.Entry

func WithTime

func WithTime(ctx context.Context, t time.Time) *logrus.Entry

Types

type Logger

type Logger interface {
	SetLevel(level logrus.Level)
	GetLevel() logrus.Level
	WithField(key string, value interface{}) *logrus.Entry
	WithFields(fields logrus.Fields) *logrus.Entry
	WithError(err error) *logrus.Entry
	WithContext(ctx context.Context) *logrus.Entry
	WithTime(t time.Time) *logrus.Entry
	Tracef(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Warningf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
	Trace(args ...interface{})
	Debug(args ...interface{})
	Info(args ...interface{})
	Print(args ...interface{})
	Warning(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	Panic(args ...interface{})
}

func GetLogger

func GetLogger() Logger

func NewLogger

func NewLogger() Logger

Jump to

Keyboard shortcuts

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