Documentation
¶
Index ¶
- Constants
- func Any(k string, v any) slog.Attr
- func AnyValue(v any) slog.Value
- func Bool(k string, v bool) slog.Attr
- func BoolValue(v bool) slog.Value
- func Debug(msg string, args ...any)
- func DebugContext(ctx context.Context, msg string, args ...any)
- func Default() *slog.Logger
- func Duration(k string, v time.Duration) slog.Attr
- func DurationValue(v time.Duration) slog.Value
- func Error(msg string, args ...any)
- func ErrorContext(ctx context.Context, msg string, args ...any)
- func Float64(k string, v float64) slog.Attr
- func Float64Value(v float64) slog.Value
- func Group(k string, args ...any) slog.Attr
- func GroupValue(as ...Attr) slog.Value
- func Info(msg string, args ...any)
- func InfoContext(ctx context.Context, msg string, args ...any)
- func Int(k string, v int) slog.Attr
- func Int64(k string, v int64) slog.Attr
- func Int64Value(v int64) slog.Value
- func IntValue(v int) slog.Value
- func Log(ctx context.Context, level slog.Level, msg string, args ...any)
- func LogAttrs(ctx context.Context, level slog.Level, msg string, attrs ...Attr)
- func New(h slog.Handler) *slog.Logger
- func NewLogLogger(h Handler, level slog.Level) *log.Logger
- func NewRecord(t time.Time, lvl slog.Level, s string, p uintptr) slog.Record
- func SetDefault(l *slog.Logger)
- func String(k, v string) slog.Attr
- func StringValue(value string) slog.Value
- func Time(k string, v time.Time) slog.Attr
- func TimeValue(v time.Time) slog.Value
- func Uint64(k string, v uint64) slog.Attr
- func Uint64Value(v uint64) slog.Value
- func Warn(msg string, args ...any)
- func WarnContext(ctx context.Context, msg string, args ...any)
- func With(args ...any) *slog.Logger
- type Attr
- type Handler
- type HandlerOptions
- type JSONHandler
- type Kind
- type Level
- type LevelVar
- type Leveler
- type LogValuer
- type Logger
- type Record
- type Source
- type TextHandler
- type Value
Constants ¶
View Source
const ( LevelDebug = slog.LevelDebug LevelInfo = slog.LevelInfo LevelWarn = slog.LevelWarn LevelError = slog.LevelError KindAny = slog.KindAny )
Variables ¶
This section is empty.
Functions ¶
func Float64Value ¶ added in v0.7.3
func GroupValue ¶ added in v0.7.3
func Int64Value ¶ added in v0.7.3
func SetDefault ¶ added in v0.7.3
func StringValue ¶
func Uint64Value ¶ added in v0.7.3
Types ¶
type Handler ¶
func NewJSONHandler ¶
func NewJSONHandler(w io.Writer, opts *HandlerOptions) Handler
type HandlerOptions ¶
type HandlerOptions = slog.HandlerOptions
type JSONHandler ¶ added in v0.7.3
type JSONHandler = slog.JSONHandler
type TextHandler ¶ added in v0.7.3
type TextHandler = slog.TextHandler
func NewTextHandler ¶ added in v0.7.3
func NewTextHandler(w io.Writer, opts *HandlerOptions) *TextHandler
Click to show internal directories.
Click to hide internal directories.