Documentation
¶
Index ¶
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func Fatal(msg string, args ...any)
- func GetLogger() *slog.Logger
- func Info(msg string, args ...any)
- func IsRawMode() bool
- func SetLogLevel(level slog.Level)
- func SetLogLevelString(level string)
- func SetRawMode(raw bool)
- func SetVerbose(verbose bool)
- func Warn(msg string, args ...any)
- type CompactHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLogLevelString ¶
func SetLogLevelString(level string)
SetLogLevelString sets the log level from a string (debug, info, warn, error)
func SetRawMode ¶
func SetRawMode(raw bool)
SetRawMode enables or disables raw mode (bypasses all logging)
Types ¶
type CompactHandler ¶
type CompactHandler struct {
// contains filtered or unexported fields
}
CompactHandler is a custom slog handler that formats messages cleanly
func NewCompactHandler ¶
func NewCompactHandler(w io.Writer, opts *slog.HandlerOptions) *CompactHandler
Click to show internal directories.
Click to hide internal directories.