logger

package
v0.0.0-...-4659cd4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCliSlogHandler = F.Constant1[*cli.Context](MakeInfoJSONHandler())
View Source
var SlogCliHandlers = map[T.Tuple2[string, string]]func(*cli.Context) slog.Handler{
	T.MakeTuple2("debug", "text"): F.Constant1[*cli.Context](
		MakeDebugTextHandler(),
	),
	T.MakeTuple2("debug", "json"): F.Constant1[*cli.Context](
		MakeDebugJSONHandler(),
	),
	T.MakeTuple2("info", "text"): F.Constant1[*cli.Context](
		MakeInfoTextHandler(),
	),
	T.MakeTuple2("info", "json"): F.Constant1[*cli.Context](
		MakeInfoJSONHandler(),
	),
}

Functions

func ExtractCliLogKey

func ExtractCliLogKey(cltx *cli.Context) T.Tuple2[string, string]

func GetCliSlogHandler

func GetCliSlogHandler(cltx *cli.Context) slog.Handler

func GetSlogHandler

func GetSlogHandler(cmd *cobra.Command) slog.Handler

func MakeDebugJSONHandler

func MakeDebugJSONHandler() slog.Handler

func MakeDebugTextHandler

func MakeDebugTextHandler() slog.Handler

func MakeInfoJSONHandler

func MakeInfoJSONHandler() slog.Handler

func MakeInfoTextHandler

func MakeInfoTextHandler() slog.Handler

func NewCliLogger

func NewCliLogger(cltx *cli.Context) (*logrus.Entry, error)

func NewLogger

func NewLogger(cmd *cobra.Command) (*logrus.Entry, error)

func SetupCliLogger

func SetupCliLogger(cltx *cli.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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