Documentation
¶
Index ¶
- Variables
- func Error(err error) slog.Attr
- func ErrorValue(err error) slog.Value
- func FromContext(ctx context.Context) *slog.Logger
- func NewContext(ctx context.Context, logger *slog.Logger) context.Context
- func NewHandler(hdl slog.Handler, opts ...HandlerOption) slog.Handler
- type HandleFunc
- type Handler
- type HandlerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorKey = "error"
Functions ¶
func ErrorValue ¶
func NewHandler ¶
func NewHandler(hdl slog.Handler, opts ...HandlerOption) slog.Handler
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) Apply ¶
func (ch *Handler) Apply(opt HandlerOption)
type HandlerOption ¶
type HandlerOption func(*Handler)
func WithDisableStackTrace ¶ added in v0.3.1
func WithDisableStackTrace(disabled bool) HandlerOption
func WithHandleFunc ¶
func WithHandleFunc(fn HandleFunc) HandlerOption
func WithStackKey ¶ added in v0.3.1
func WithStackKey(key string) HandlerOption
Click to show internal directories.
Click to hide internal directories.