Documentation
¶
Index ¶
- func AppendSlogAttributesToCtx(ctx context.Context, attributes []slog.Attr) context.Context
- func Error(err error) slog.Attr
- func InitLogger(isDebugModeEnabled bool)
- type ContextualSlogAttributesHandler
- type CustomTextHandler
- func (c *CustomTextHandler) Enabled(ctx context.Context, logLevel slog.Level) bool
- func (c *CustomTextHandler) Handle(ctx context.Context, record slog.Record) error
- func (c *CustomTextHandler) WithAttrs(attributes []slog.Attr) slog.Handler
- func (c *CustomTextHandler) WithGroup(name string) slog.Handler
- type SlogAttributesCtxKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendSlogAttributesToCtx ¶
Appends slog attributes to the given context. The modified context is then returned.
Types ¶
type ContextualSlogAttributesHandler ¶
type CustomTextHandler ¶
type CustomTextHandler struct {
// contains filtered or unexported fields
}
func NewCustomTextHandler ¶
func NewCustomTextHandler(writer io.Writer, options *slog.HandlerOptions) *CustomTextHandler
type SlogAttributesCtxKey ¶
type SlogAttributesCtxKey struct{}
Click to show internal directories.
Click to hide internal directories.