logger

package
v0.8.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.2.4

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

func Debugf added in v0.5.2

func Debugf(format string, args ...any)

func Error added in v0.2.4

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

func Errorf added in v0.5.2

func Errorf(format string, args ...any)

func ErrorfWithNotifier added in v0.6.0

func ErrorfWithNotifier(title, format string, args ...any)

func Fatal added in v0.3.2

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

func Fatalf added in v0.5.2

func Fatalf(format string, args ...any)

func FromContext added in v0.3.2

func FromContext(ctx context.Context) *slog.Logger

FromContext retrieves the logger from context, falling back to the global logger.

func GetLogger added in v0.2.5

func GetLogger() *slog.Logger

func Info added in v0.2.4

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

func Infof added in v0.5.2

func Infof(format string, args ...any)

Infof, Debugf, Warnf, Errorf, and Fatalf are printf-style variants: format is resolved via fmt.Sprintf before logging, for callers building a message dynamically instead of attaching structured key-value fields.

func Init

func Init() *slog.Logger

func Warn added in v0.2.4

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

func Warnf added in v0.5.2

func Warnf(format string, args ...any)

func WarnfWithNotifier added in v0.6.0

func WarnfWithNotifier(title, format string, args ...any)

func WithContext added in v0.3.2

func WithContext(ctx context.Context, l *slog.Logger) context.Context

WithContext stores a logger in the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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