logger

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSlogAttrFromError

func GetSlogAttrFromError(err error) slog.Attr

func GetSlogAttrFromRequest

func GetSlogAttrFromRequest(req *http.Request) slog.Attr

func New

func New() *slog.Logger

func NewWithLevel

func NewWithLevel(level slog.Level) *slog.Logger

Types

type Logger

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

type Mock

type Mock struct {
	mock.Mock
}

func NewMock

func NewMock() *Mock

func (*Mock) Debug

func (l *Mock) Debug(message string, args ...any)

func (*Mock) Error

func (l *Mock) Error(message string, args ...any)

func (*Mock) Info

func (l *Mock) Info(message string, args ...any)

Jump to

Keyboard shortcuts

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