Documentation
¶
Index ¶
- Variables
- func ExtractCliLogKey(cltx *cli.Context) T.Tuple2[string, string]
- func GetCliSlogHandler(cltx *cli.Context) slog.Handler
- func GetSlogHandler(cmd *cobra.Command) slog.Handler
- func MakeDebugJSONHandler() slog.Handler
- func MakeDebugTextHandler() slog.Handler
- func MakeInfoJSONHandler() slog.Handler
- func MakeInfoTextHandler() slog.Handler
- func NewCliLogger(cltx *cli.Context) (*logrus.Entry, error)
- func NewLogger(cmd *cobra.Command) (*logrus.Entry, error)
- func SetupCliLogger(cltx *cli.Context) error
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 MakeDebugJSONHandler ¶
func MakeDebugTextHandler ¶
func MakeInfoJSONHandler ¶
func MakeInfoTextHandler ¶
func SetupCliLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.