Versions in this module Expand all Collapse all v0 v0.0.1 Oct 11, 2024 Changes in this version + const LevelCrit + const LevelDebug + const LevelError + const LevelInfo + const LevelTrace + const LevelWarn + const LvlDebug + const LvlInfo + const LvlTrace + func Crit(msg string, ctx ...interface{}) + func Debug(msg string, ctx ...interface{}) + func DiscardHandler() slog.Handler + func Error(msg string, ctx ...interface{}) + func FormatLogfmtUint64(n uint64) string + func FormatSlogValue(v slog.Value, tmp []byte) (result []byte) + func FromLegacyLevel(lvl int) slog.Level + func Info(msg string, ctx ...interface{}) + func JSONHandler(wr io.Writer) slog.Handler + func JSONHandlerWithLevel(wr io.Writer, level slog.Level) slog.Handler + func LevelAlignedString(l slog.Level) string + func LevelString(l slog.Level) string + func LogfmtHandler(wr io.Writer) slog.Handler + func LogfmtHandlerWithLevel(wr io.Writer, level slog.Level) slog.Handler + func SetDefault(l Logger) + func Trace(msg string, ctx ...interface{}) + func Warn(msg string, ctx ...interface{}) + type GlogHandler struct + func NewGlogHandler(h slog.Handler) *GlogHandler + func (h *GlogHandler) Enabled(ctx context.Context, lvl slog.Level) bool + func (h *GlogHandler) Handle(_ context.Context, r slog.Record) error + func (h *GlogHandler) Verbosity(level slog.Level) + func (h *GlogHandler) Vmodule(ruleset string) error + func (h *GlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *GlogHandler) WithGroup(name string) slog.Handler + type Logger interface + Crit func(msg string, ctx ...interface{}) + Debug func(msg string, ctx ...interface{}) + Enabled func(ctx context.Context, level slog.Level) bool + Error func(msg string, ctx ...interface{}) + Handler func() slog.Handler + Info func(msg string, ctx ...interface{}) + Log func(level slog.Level, msg string, ctx ...interface{}) + New func(ctx ...interface{}) Logger + Trace func(msg string, ctx ...interface{}) + Warn func(msg string, ctx ...interface{}) + With func(ctx ...interface{}) Logger + Write func(level slog.Level, msg string, attrs ...any) + func New(ctx ...interface{}) Logger + func NewLogger(h slog.Handler) Logger + func Root() Logger + type TerminalHandler struct + func NewTerminalHandler(wr io.Writer, useColor bool) *TerminalHandler + func NewTerminalHandlerWithLevel(wr io.Writer, lvl slog.Level, useColor bool) *TerminalHandler + func (h *TerminalHandler) Enabled(_ context.Context, level slog.Level) bool + func (h *TerminalHandler) Handle(_ context.Context, r slog.Record) error + func (h *TerminalHandler) ResetFieldPadding() + func (h *TerminalHandler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *TerminalHandler) WithGroup(name string) slog.Handler + type TerminalStringer interface + TerminalString func() string