Versions in this module Expand all Collapse all v0 v0.1.0 Jul 19, 2026 Changes in this version + func WithTempLevel(ctx context.Context, level slog.Level) context.Context + func WithTempOutput(ctx context.Context, out io.Writer, only bool) context.Context + type AsyncWriter struct + func NewAsyncWriter(dst io.Writer, bufferSize int, fallback func(msg string, args ...any)) *AsyncWriter + func (w *AsyncWriter) Close() error + func (w *AsyncWriter) Write(p []byte) (int, error) + type BufferedWriter struct + func NewBufferedWriter(w io.Writer, bufferSize int) *BufferedWriter + func (bw *BufferedWriter) Flush() error + func (bw *BufferedWriter) Write(p []byte) (int, error) + type Handler struct + func New(opts ...Option) (*Handler, error) + func (h *Handler) Close() error + func (h *Handler) Enabled(ctx context.Context, level slog.Level) bool + func (h *Handler) Handle(ctx context.Context, record slog.Record) error + func (h *Handler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *Handler) WithGroup(name string) slog.Handler + type Option func(*options) error + func WithAbbreviatedSourcePath() Option + func WithAsyncErrorOutput(dst io.Writer, bufferSize int, fallback func(msg string, args ...any)) Option + func WithContext(ctx context.Context) Option + func WithDefaultOutput(out io.Writer) Option + func WithErrorOutput(out io.Writer) Option + func WithLogFile(path string) Option + func WithMinLevel(level slog.Level) Option + func WithModulePrefix() Option + func WithPlaceholderReplace() Option + func WithPrefixFunc(fn func(context.Context, slog.Record) string) Option + func WithReplaceAttr(fn func(groups []string, a slog.Attr) slog.Attr) Option + func WithSourcePath() Option + func WithStackTraceFunc(fn func(error) string) Option + func WithTimestampFormat(layout string) Option + func WithoutSource() Option + func WithoutTimestamp() Option