Tags: ssgreg/logf
Tags
logf v2.0.0-beta.2 Changes since beta.1: - Contextless logging: Debugx, Infox, Warnx, Errorx — no ctx parameter - Nil context support: all methods accept nil ctx (treated as context.Background()) - Test coverage improved from 86.6% to 92.5%
logf v2.0.0-beta.1 First beta of logf v2 — a complete rewrite of the logging pipeline. Breaking changes from v1: - Module path: github.com/ssgreg/logf/v2 - Logger API now requires context.Context as first argument - Field encoder interfaces simplified (removed rare types) - SlabWriter uses builder pattern instead of functional options - Removed BufferedWriter (replaced by SlabWriter) New features: - Context-aware fields (logf.With(ctx, ...)) - Native slog bridge (logger.Slog()) - Router for multi-destination logging - SlabWriter with async slab-based I/O - WriterSlot for lazy destination initialization - Text encoder with colored console output - JSON/Text encoder builders - LoggerBuilder (NewLogger().Build()) - logfc package (logger-in-context) - Group fields and WithGroup - WithName for named loggers Performance: - 32% faster than zap and zerolog on real file I/O (6 fields) - With() 7.6× faster than zap, WithGroup() 20× faster - p99 latency 43µs under I/O pressure (vs zap 56µs, slog 17.9ms) - Zero-alloc hot path (except variadic []Field slice)
PreviousNext