prettylog

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func New added in v1.2.0

func New(handlerOptions *slog.HandlerOptions, options ...Option) *Handler

func NewHandler

func NewHandler(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

type Option added in v1.2.0

type Option func(h *Handler)

func WithColor added in v1.2.0

func WithColor() Option

func WithDestinationWriter added in v1.2.0

func WithDestinationWriter(writer io.Writer) Option

func WithOutputEmptyAttrs added in v1.3.0

func WithOutputEmptyAttrs() Option

Jump to

Keyboard shortcuts

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