package log

Import Path
	oss.terrastruct.com/d2/lib/log (on go.dev)

Dependency Relation
	imports 7 packages, and imported by 3 packages

Involved Source Files Copied from https://pkg.go.dev/log/slog#Handler Package log is a context wrapper around slog.Logger prettyhandler.go tbhandler.go
Package-Level Type Names (total 2)
/* sort by: | */
A LevelHandler wraps a Handler with an Enabled method that returns false for levels below a minimum. Enabled implements Handler.Enabled by reporting whether level is at least as large as h's level. Handle implements Handler.Handle. Handler returns the Handler wrapped by h. WithAttrs implements Handler.WithAttrs. WithGroup implements Handler.WithGroup. *LevelHandler : log/slog.Handler func NewLevelHandler(level slog.Leveler, h slog.Handler) *LevelHandler
(*PrettyHandler) Enabled(ctx context.Context, level slog.Level) bool (*PrettyHandler) Handle(ctx context.Context, r slog.Record) error (*PrettyHandler) WithAttrs(attrs []slog.Attr) slog.Handler (*PrettyHandler) WithGroup(name string) slog.Handler *PrettyHandler : log/slog.Handler func NewPrettyHandler(h slog.Handler) *PrettyHandler
Package-Level Functions (total 11)
func Debug(ctx context.Context, msg string, attrs ...slog.Attr)
func Error(ctx context.Context, msg string, attrs ...slog.Attr)
func Info(ctx context.Context, msg string, attrs ...slog.Attr)
func Init()
NewLevelHandler returns a LevelHandler with the given level. All methods except Enabled delegate to h.
func Warn(ctx context.Context, msg string, attrs ...slog.Attr)