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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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