Versions in this module Expand all Collapse all v0 v0.2.0 Sep 9, 2026 v0.1.0 Aug 22, 2026 Changes in this version + func NewContextHandler(next slog.Handler, fn AttrsFunc) slog.Handler + func NewHandler(cfg Config, fn AttrsFunc) (slog.Handler, io.Closer, error) + func Setup(cfg Config, fn AttrsFunc) (io.Closer, error) + type AttrsFunc func(ctx context.Context) []slog.Attr + type Config struct + File string + Format Format + Level slog.Level + TimeFormat TimeFormat + func ConfigFromEnv() (Config, error) + type Format string + const FormatJSON + const FormatText + type TimeFormat string + const TimeDateMilli + const TimeDateSec + const TimeMilli + const TimeNano + const TimeRFC3339 + const TimeRFC3339Nano + const TimeSec