logger

package
v0.0.0-...-c20d9b3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Level

func Level() string

func NewLogger

func NewLogger(cfg *Config) *slog.Logger

func SetLevel

func SetLevel(lv string)

Types

type Config

type Config struct {
	Level string
}

type ContextLogger

type ContextLogger struct {
	slog.Handler
}

func (*ContextLogger) Enabled

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

func (*ContextLogger) Handle

func (c *ContextLogger) Handle(ctx context.Context, r 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

type RequestIDKey

type RequestIDKey struct{}

type UserIDKey

type UserIDKey struct{}

Jump to

Keyboard shortcuts

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