Versions in this module Expand all Collapse all v0 v0.1.0 Apr 14, 2024 v0.0.10 Apr 14, 2024 Changes in this version + var ColorSchemeIsDark = true + var UseColor = true + var UserLevel = defaultUserLevel + func ApplyColor(clr color.Color, str string) string + func CmdColor(str string) string + func ColorScheme() *matcolor.Scheme + func DebugColor(str string) string + func ErrorColor(str string) string + func InfoColor(str string) string + func InitColor() + func LevelColor(level slog.Level, str string) string + func LevelFromFlags(vv, v, q bool) slog.Level + func Print(level slog.Level, a ...any) (n int, err error) + func PrintDebug(a ...any) (n int, err error) + func PrintError(a ...any) (n int, err error) + func PrintInfo(a ...any) (n int, err error) + func PrintWarn(a ...any) (n int, err error) + func Printf(level slog.Level, format string, a ...any) (n int, err error) + func PrintfDebug(format string, a ...any) (n int, err error) + func PrintfError(format string, a ...any) (n int, err error) + func PrintfInfo(format string, a ...any) (n int, err error) + func PrintfWarn(format string, a ...any) (n int, err error) + func Println(level slog.Level, a ...any) (n int, err error) + func PrintlnDebug(a ...any) (n int, err error) + func PrintlnError(a ...any) (n int, err error) + func PrintlnInfo(a ...any) (n int, err error) + func PrintlnWarn(a ...any) (n int, err error) + func SetDefaultLogger() + func SuccessColor(str string) string + func TitleColor(str string) string + func WarnColor(str string) string + type Handler struct + Mu sync.Mutex + Opts slog.HandlerOptions + Prefix string + Preformat string + W io.Writer + func NewHandler(w io.Writer, opts *slog.HandlerOptions) *Handler + func (h *Handler) AppendAttr(buf []byte, prefix string, a slog.Attr) []byte + func (h *Handler) Enabled(ctx context.Context, level slog.Level) bool + func (h *Handler) Handle(ctx context.Context, r slog.Record) error + func (h *Handler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *Handler) WithGroup(name string) slog.Handler