logger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level string
	// CallerSkipFrameCount controls the total number of stack frames skipped
	// when reporting the caller. A value of 0 uses the default (3).
	CallerSkipFrameCount int
}

type Interface

type Interface interface {
	Trace(ctx context.Context, obj any)
	Debug(ctx context.Context, obj any)
	// Debugf logs a formatted debug message.
	Debugf(ctx context.Context, format string, args ...any)
	Info(ctx context.Context, obj any)
	Warn(ctx context.Context, obj any)
	Error(ctx context.Context, obj any)
	Fatal(ctx context.Context, obj any)
	Panic(obj any)
}

func DefaultLogger

func DefaultLogger() Interface

func Init

func Init(cfg Config) Interface

Init creates a new logger configured according to cfg. Each call returns an independent logger instance; there is no global singleton.

Jump to

Keyboard shortcuts

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