pretty

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorReset  = "\033[0m"
	ColorMuted  = "\033[90m"
	ColorBase   = "\033[0m"
	ColorKey    = "\033[0m"
	ColorString = "\033[93m"
	ColorNumber = "\033[92m"
	ColorBool   = "\033[94m"
	ColorNull   = "\033[95m"

	ColorDebug = "\033[37m"
	ColorInfo  = "\033[94m"
	ColorWarn  = "\033[33m"
	ColorError = "\033[31m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PrettyHandler

type PrettyHandler struct {
	// contains filtered or unexported fields
}

func NewHandler added in v0.0.9

func NewHandler(w io.Writer, opts *slog.HandlerOptions) *PrettyHandler

func (*PrettyHandler) Enabled

func (h *PrettyHandler) Enabled(_ context.Context, l slog.Level) bool

func (*PrettyHandler) Handle

func (h *PrettyHandler) Handle(_ context.Context, r slog.Record) error

func (*PrettyHandler) WithAttrs

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

func (*PrettyHandler) WithGroup

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

Jump to

Keyboard shortcuts

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