Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCLILogger ¶
NewCLILogger creates a new logger with CLI-friendly output format.
func ParseLogLevel ¶
ParseLogLevel converts a string to slog.Level.
func SetDefaultCLILogger ¶
SetDefaultCLILogger initializes the CLI logger and sets it as the default.
Types ¶
type CLIHandler ¶
type CLIHandler struct {
// contains filtered or unexported fields
}
CLIHandler is a custom slog.Handler for CLI output.
func NewCLIHandler ¶
func NewCLIHandler(w io.Writer, level slog.Level) *CLIHandler
NewCLIHandler creates a new CLI handler that writes to the given writer.
func (*CLIHandler) Enabled ¶
Enabled returns true if the handler handles records at the given level.
Click to show internal directories.
Click to hide internal directories.