logs

package
v0.0.0-...-0384855 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LevelTrace = slog.Level(-8)
	LevelFatal = slog.Level(12)
)

Variables

This section is empty.

Functions

func ProgressDone

func ProgressDone(logger *slog.Logger, message string, err error)

func ProgressTracker

func ProgressTracker(logger *slog.Logger, tracker *progress.Tracker)

Types

type Handler

type Handler struct {
	slog.Handler
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(
	out io.Writer,
	opts slog.HandlerOptions,
) *Handler

func (*Handler) Enabled

func (h *Handler) Enabled(ctx context.Context, level slog.Level) bool

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, r slog.Record) error

func (*Handler) WithAttrs

func (h *Handler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*Handler) WithGroup

func (h *Handler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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