logger

package
v0.0.0-...-bb2d5e8 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEntry

func GetEntry() *logrus.Entry

func Initialize

func Initialize(cfg config.Config)

func ResetLogger

func ResetLogger()

Types

type Logger

type Logger interface {
	Trace(args ...interface{})
	Tracef(format string, args ...interface{})
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Print(args ...interface{})
	Printf(format string, args ...interface{})
	Warn(args ...interface{})
	Warnf(format string, args ...interface{})
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
	WithFields(fields logrus.Fields) *logrus.Entry
}

func GetLogger

func GetLogger() Logger

type LogrusWriter

type LogrusWriter struct{}

func (LogrusWriter) Write

func (w LogrusWriter) Write(p []byte) (n int, err error)

This will permit to fetch leaderelection log and use logrus with good formatting to forward them

type SentryHook

type SentryHook struct {
	// contains filtered or unexported fields
}

func NewSentryHook

func NewSentryHook(sampleRate float64) *SentryHook

func (*SentryHook) Fire

func (hook *SentryHook) Fire(entry *logrus.Entry) error

func (*SentryHook) Levels

func (hook *SentryHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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