Documentation ¶
Index ¶
- Constants
- func Default() *slog.Logger
- func New(h slog.Handler) *slog.Logger
- func NewRecord(t time.Time, lvl slog.Level, s string, p uintptr) slog.Record
- func String(k, v string) slog.Attr
- func StringValue(value string) slog.Value
- type Attr
- type Handler
- type HandlerOptions
- type Level
- type LevelVar
- type Leveler
- type Logger
- type Record
- type Value
Constants ¶
View Source
const ( LevelDebug = slog.LevelDebug LevelInfo = slog.LevelInfo LevelWarn = slog.LevelWarn LevelError = slog.LevelError )
Variables ¶
This section is empty.
Functions ¶
func StringValue ¶
Types ¶
type Handler ¶
func NewJSONHandler ¶
func NewJSONHandler(w io.Writer, opts *HandlerOptions) Handler
func NewTextHandler ¶
func NewTextHandler(w io.Writer, opts *HandlerOptions) Handler
type HandlerOptions ¶
type HandlerOptions = slog.HandlerOptions
Click to show internal directories.
Click to hide internal directories.