Documentation
¶
Overview ¶
Package logging provides custom console logging handlers with support for unified time formatting, ANSI colors, and multiline log readability.
Key Components:
- ConsoleHandler: Custom slog.Handler that formats logs with ANSI colors
- NewLogger(): Creates a new scoped logger
Dependencies:
- log/slog: Structured logging standard library
Example:
log := logging.NewLogger("my-subsystem")
log.Info("Hello, world")
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = NewLogger("")
Functions ¶
func DebugEnabled ¶
func DebugEnabled() bool
Types ¶
type ConsoleHandler ¶
type ConsoleHandler struct {
// contains filtered or unexported fields
}
func NewConsoleHandler ¶
Click to show internal directories.
Click to hide internal directories.