log

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...any)

func Error

func Error(msg string, args ...any)

func Info

func Info(msg string, args ...any)

func Set

func Set(logger Logger)

func Warn

func Warn(msg string, args ...any)

Types

type Logger

type Logger interface {
	Info(string, ...any)
	Debug(string, ...any)
	Warn(string, ...any)
	Error(string, ...any)
}

func Default

func Default() Logger

func NewPrefixed

func NewPrefixed(prefix string, original Logger) Logger

func NewZerolog

func NewZerolog(writer io.Writer, level string) Logger

type Mock

type Mock struct {
	Messages []string
}

func NewMock

func NewMock() *Mock

func (*Mock) Debug

func (m *Mock) Debug(msg string, args ...any)

func (*Mock) Error

func (m *Mock) Error(msg string, args ...any)

func (*Mock) Info

func (m *Mock) Info(msg string, args ...any)

func (*Mock) Warn

func (m *Mock) Warn(msg string, args ...any)

type Prefixed

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

func (*Prefixed) Debug

func (p *Prefixed) Debug(msg string, args ...any)

func (*Prefixed) Error

func (p *Prefixed) Error(msg string, args ...any)

func (*Prefixed) Info

func (p *Prefixed) Info(msg string, args ...any)

func (*Prefixed) Warn

func (p *Prefixed) Warn(msg string, args ...any)

type Zerolog

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

func (*Zerolog) Debug

func (z *Zerolog) Debug(msg string, args ...any)

func (*Zerolog) Error

func (z *Zerolog) Error(msg string, args ...any)

func (*Zerolog) Info

func (z *Zerolog) Info(msg string, args ...any)

func (*Zerolog) Warn

func (z *Zerolog) Warn(msg string, args ...any)

Jump to

Keyboard shortcuts

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