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: 2 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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