Documentation
¶
Index ¶
- func CloseBuffer(buf *bytes.Buffer)
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func GetBuffer() *bytes.Buffer
- func Info(msg string, args ...any)
- func NewHandler(w io.Writer, opts *Options) slog.Handler
- func NewSpan(name string, args ...any) context.Context
- func NewSpanCtx(parent context.Context, name string, args ...any) context.Context
- func Warn(msg string, args ...any)
- type Options
- type Span
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseBuffer ¶
Clear a line buffer (while still retaining capacity) and potentially return it to the main buffer pool
func NewHandler ¶
NewHandler - Return a slog.Handler to be used for tracing
func NewSpan ¶
Enter a new tracing span, returning its context to be used with `slog` methods. If name == "", then runtime.Callers will be used to get the names of up to 2 functions above NewSpan in the call stack (and will create a context 2 levels deep with this information)
func NewSpanCtx ¶ added in v0.5.2
Enter a new tracing span, returning a new context with the new span. If the parent ctx contains a span, the new span will be added as a child
Types ¶
Click to show internal directories.
Click to hide internal directories.