Documentation
¶
Overview ¶
Package logger provides colored console logging with configurable log levels.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger *slog.Logger
Logger is the global logger instance used throughout the application.
Functions ¶
Types ¶
type ColorHandler ¶
type ColorHandler struct {
// contains filtered or unexported fields
}
ColorHandler wraps a slog.Handler to add color to log levels
func NewColorHandler ¶
func NewColorHandler(w io.Writer, opts *slog.HandlerOptions) *ColorHandler
NewColorHandler creates a new colored log handler for terminal output.
func (*ColorHandler) Enabled ¶
Enabled reports whether the handler handles records at the given level.
Click to show internal directories.
Click to hide internal directories.