logging

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BunSlogHook

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

func NewBunSlogHook

func NewBunSlogHook(logger *slog.Logger) *BunSlogHook

func (*BunSlogHook) AfterQuery

func (h *BunSlogHook) AfterQuery(ctx context.Context, event *bun.QueryEvent)

func (*BunSlogHook) BeforeQuery

func (h *BunSlogHook) BeforeQuery(
	ctx context.Context, event *bun.QueryEvent,
) context.Context

type ContextLogger

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

func NewContextLogger

func NewContextLogger(parent slog.Handler) *ContextLogger

func (*ContextLogger) Enabled

func (c *ContextLogger) Enabled(ctx context.Context, level slog.Level) bool

func (*ContextLogger) Handle

func (c *ContextLogger) Handle(ctx context.Context, record slog.Record) error

func (*ContextLogger) WithAttrs

func (c *ContextLogger) WithAttrs(attrs []slog.Attr) slog.Handler

func (*ContextLogger) WithGroup

func (c *ContextLogger) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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