logger

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Info(message string, fields ...interface{})
	Debug(message string, fields ...interface{})
	Error(message string, err error, fields ...interface{})
	Fatal(message string, err error, fields ...interface{})
}

func NewLogger

func NewLogger(env string) (Logger, error)

NewLogger initializes a logger

func NewNoopLogger added in v0.7.0

func NewNoopLogger() Logger

NewNoopLogger returns a logger that discards all logs

type LoggerZapImpl

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

func (*LoggerZapImpl) Debug

func (l *LoggerZapImpl) Debug(message string, fields ...interface{})

func (*LoggerZapImpl) Error

func (l *LoggerZapImpl) Error(message string, err error, fields ...interface{})

func (*LoggerZapImpl) Fatal

func (l *LoggerZapImpl) Fatal(message string, err error, fields ...interface{})

func (*LoggerZapImpl) Info

func (l *LoggerZapImpl) Info(message string, fields ...interface{})

type NoopLogger added in v0.7.0

type NoopLogger struct{}

NoOpLogger is a logger implementation that discards all logs This is useful for testing to prevent logs from cluttering test output

func (*NoopLogger) Debug added in v0.7.0

func (l *NoopLogger) Debug(message string, fields ...interface{})

func (*NoopLogger) Error added in v0.7.0

func (l *NoopLogger) Error(message string, err error, fields ...interface{})

func (*NoopLogger) Fatal added in v0.7.0

func (l *NoopLogger) Fatal(message string, err error, fields ...interface{})

func (*NoopLogger) Info added in v0.7.0

func (l *NoopLogger) Info(message string, fields ...interface{})

Jump to

Keyboard shortcuts

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