Documentation
¶
Index ¶
- func InitLogger(env string) *slog.Logger
- func WithLogRequestID(ctx context.Context, requestID string) context.Context
- func WithLogUserID(ctx context.Context, userID string) context.Context
- type SlogHandlerMiddleware
- func (m *SlogHandlerMiddleware) Enabled(ctx context.Context, rec slog.Level) bool
- func (m *SlogHandlerMiddleware) Handle(ctx context.Context, rec slog.Record) error
- func (m *SlogHandlerMiddleware) WithAttrs(attrs []slog.Attr) slog.Handler
- func (m *SlogHandlerMiddleware) WithGroup(name string) slog.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
func WithLogRequestID ¶
Types ¶
type SlogHandlerMiddleware ¶
type SlogHandlerMiddleware struct {
// contains filtered or unexported fields
}
func NewSlogHandlerMiddleware ¶
func NewSlogHandlerMiddleware(next slog.Handler) *SlogHandlerMiddleware
Click to show internal directories.
Click to hide internal directories.