log

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogHandler added in v0.9.0

func NewLogHandler(level slog.Leveler) slog.Handler

NewLogHandler creates a new slog handler that uses the provided log level but otherwise clones the default slog handler.

Types

type LevelFlag added in v0.9.0

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

LevelFlag implement the flag.Value interface and can be used as a command line flag for specifying the log level.

func NewLevelFlag added in v0.9.0

func NewLevelFlag(level slog.Level) *LevelFlag

func (*LevelFlag) Level added in v0.9.0

func (l *LevelFlag) Level() slog.Level

func (*LevelFlag) Set added in v0.9.0

func (l *LevelFlag) Set(s string) error

Set the log level.

func (*LevelFlag) String added in v0.9.0

func (l *LevelFlag) String() string

String returns the string representation of the log level.

Jump to

Keyboard shortcuts

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