indenthandler

package
v0.0.0-...-d7b0ac1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndentHandler

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

!+IndentHandler

func New

func New(out io.Writer, opts *Options) *IndentHandler

func (*IndentHandler) Enabled

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

func (*IndentHandler) Handle

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

!+Handle

func (*IndentHandler) WithAttrs

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

!+WithAttrs

func (*IndentHandler) WithGroup

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

!+WithGroup

type Options

type Options struct {
	// Level reports the minimum level to log.
	// Levels with lower levels are discarded.
	// If nil, the Handler uses [slog.LevelInfo].
	Level slog.Leveler
}

Jump to

Keyboard shortcuts

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