indenthandler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: BSD-3-Clause Imports: 9 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