logger

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LevelNames = map[string]slog.Level{
	"debug": slog.LevelDebug,
	"info":  slog.LevelInfo,
	"warn":  slog.LevelWarn,
	"error": slog.LevelError,
}

Functions

func CompactAny

func CompactAny(val interface{}) *compactAny

CompactAny wraps any value to show it in log truncated

func CompactValue

func CompactValue[T string | []byte](v T) *compactValue[T]

CompactValue wraps any scalar value to show it in log truncated

func CompactValues

func CompactValues[T string | []byte, S []T](v S) []*compactValue[T]

func InitLogger

func InitLogger(format string, level string) (slog.Handler, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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