logger

package
v0.0.0-...-8ae5609 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(env string) *slog.Logger

func WithLogRequestID

func WithLogRequestID(ctx context.Context, requestID string) context.Context

func WithLogUserID

func WithLogUserID(ctx context.Context, userID string) context.Context

Types

type SlogHandlerMiddleware

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

func NewSlogHandlerMiddleware

func NewSlogHandlerMiddleware(next slog.Handler) *SlogHandlerMiddleware

func (*SlogHandlerMiddleware) Enabled

func (m *SlogHandlerMiddleware) Enabled(ctx context.Context, rec slog.Level) bool

func (*SlogHandlerMiddleware) Handle

func (m *SlogHandlerMiddleware) Handle(ctx context.Context, rec slog.Record) error

func (*SlogHandlerMiddleware) WithAttrs

func (m *SlogHandlerMiddleware) WithAttrs(attrs []slog.Attr) slog.Handler

func (*SlogHandlerMiddleware) WithGroup

func (m *SlogHandlerMiddleware) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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