logging

package
v0.0.0-...-2e97daa Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevNullLogger

type DevNullLogger struct {
}

func NewDevNullLogger

func NewDevNullLogger() DevNullLogger

func (DevNullLogger) Debug

func (d DevNullLogger) Debug() Entry

func (DevNullLogger) Error

func (d DevNullLogger) Error() Entry

func (DevNullLogger) New

func (d DevNullLogger) New(name string) Logger

func (DevNullLogger) Trace

func (d DevNullLogger) Trace() Entry

func (DevNullLogger) WithError

func (d DevNullLogger) WithError(err error) Logger

func (DevNullLogger) WithField

func (d DevNullLogger) WithField(key string, v any) Logger

type DevNullLoggingSystem

type DevNullLoggingSystem struct {
}

func NewDevNullLoggingSystem

func NewDevNullLoggingSystem() DevNullLoggingSystem

func (DevNullLoggingSystem) Debug

func (DevNullLoggingSystem) EnabledLevel

func (d DevNullLoggingSystem) EnabledLevel() Level

func (DevNullLoggingSystem) Error

func (DevNullLoggingSystem) Trace

type Entry

type Entry interface {
	WithError(err error) Entry
	WithField(key string, v any) Entry
	Message(msg string)
}

type Level

type Level int
const (
	LevelTrace Level = iota
	LevelDebug
	LevelError
	LevelDisabled
)

type Logger

type Logger interface {
	New(name string) Logger
	WithError(err error) Logger
	WithField(key string, v any) Logger

	Error() Entry
	Debug() Entry
	Trace() Entry
}

func NewSystemLogger

func NewSystemLogger(logger LoggingSystem, name string) Logger

type LoggingSystem

type LoggingSystem interface {
	EnabledLevel() Level
	Error() LoggingSystemEntry
	Debug() LoggingSystemEntry
	Trace() LoggingSystemEntry
}

type LoggingSystemEntry

type LoggingSystemEntry interface {
	WithField(key string, v any) LoggingSystemEntry
	Message(msg string)
}

type LogrusLoggingSystem

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

func NewLogrusLoggingSystem

func NewLogrusLoggingSystem(logger *logrus.Logger) LogrusLoggingSystem

func (LogrusLoggingSystem) Debug

func (LogrusLoggingSystem) EnabledLevel

func (t LogrusLoggingSystem) EnabledLevel() Level

func (LogrusLoggingSystem) Error

func (LogrusLoggingSystem) Trace

type SystemLogger

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

func (SystemLogger) Debug

func (l SystemLogger) Debug() Entry

func (SystemLogger) Error

func (l SystemLogger) Error() Entry

func (SystemLogger) New

func (l SystemLogger) New(name string) Logger

func (SystemLogger) Trace

func (l SystemLogger) Trace() Entry

func (SystemLogger) WithError

func (l SystemLogger) WithError(err error) Logger

func (SystemLogger) WithField

func (l SystemLogger) WithField(key string, v any) Logger

type TestingLoggingSystem

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

func NewTestingLoggingSystem

func NewTestingLoggingSystem(tb testing.TB) *TestingLoggingSystem

func (TestingLoggingSystem) Debug

func (TestingLoggingSystem) EnabledLevel

func (t TestingLoggingSystem) EnabledLevel() Level

func (TestingLoggingSystem) Error

func (TestingLoggingSystem) Trace

type WatermillAdapter

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

func NewWatermillAdapter

func NewWatermillAdapter(logger Logger) *WatermillAdapter

func (WatermillAdapter) Debug

func (a WatermillAdapter) Debug(msg string, fields watermill.LogFields)

func (WatermillAdapter) Error

func (a WatermillAdapter) Error(msg string, err error, fields watermill.LogFields)

func (WatermillAdapter) Info

func (a WatermillAdapter) Info(msg string, fields watermill.LogFields)

func (WatermillAdapter) Trace

func (a WatermillAdapter) Trace(msg string, fields watermill.LogFields)

func (WatermillAdapter) With

type ZerologLoggingSystem

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

func NewZerologLoggingSystem

func NewZerologLoggingSystem(logger zerolog.Logger) ZerologLoggingSystem

func (ZerologLoggingSystem) Debug

func (ZerologLoggingSystem) EnabledLevel

func (t ZerologLoggingSystem) EnabledLevel() Level

func (ZerologLoggingSystem) Error

func (ZerologLoggingSystem) Trace

Jump to

Keyboard shortcuts

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