slogmiddleware

package
v0.0.0-...-5888283 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OtelSlogHandler

type OtelSlogHandler struct {
	// contains filtered or unexported fields
}

func NewOtelSlogHandler

func NewOtelSlogHandler(logKey string, levels []slog.Level, handler slog.Handler) OtelSlogHandler

func (OtelSlogHandler) Enabled

func (h OtelSlogHandler) Enabled(ctx context.Context, level slog.Level) bool

func (OtelSlogHandler) Handle

func (h OtelSlogHandler) Handle(ctx context.Context, record slog.Record) error

func (OtelSlogHandler) WithAttrs

func (h OtelSlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (OtelSlogHandler) WithGroup

func (h OtelSlogHandler) WithGroup(name string) slog.Handler

type SentrySlogHandler

type SentrySlogHandler struct {
	// contains filtered or unexported fields
}

func NewSentrySlogHandler

func NewSentrySlogHandler(errorKey string, levels []slog.Level, handler slog.Handler) SentrySlogHandler

func (SentrySlogHandler) Enabled

func (h SentrySlogHandler) Enabled(ctx context.Context, level slog.Level) bool

func (SentrySlogHandler) Handle

func (h SentrySlogHandler) Handle(ctx context.Context, record slog.Record) error

func (SentrySlogHandler) WithAttrs

func (h SentrySlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (SentrySlogHandler) WithGroup

func (h SentrySlogHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL