Skip to content

Velocity v2.1.0

Choose a tag to compare

@github-actions github-actions released this 11 Jun 12:44
· 59 commits to main since this release
cab9251

Velocity v2.1.0

Fast, zero-allocation structured logging for Go with rich terminal output.

Install

go get github.com/tensorfoundrylabs/velocity@v2.1.0

Changelog

Other

  • dc693a5: add WithLevels to set console and structured thresholds together (@thushan)
  • 6599a8c: clamp effective log level to only reflect outputs that actually exist (@thushan)
  • b827ddc: copy-on-write in ConsoleWriter.SetTheme to eliminate race with WriteSecure template snapshot (@thushan)
  • 4621823: deprecate ConsoleWriterRB, fix direct-write fallback race, and honour NO_COLOR/TTY detection (@thushan)
  • d69e677: eliminate per-call heap allocation in PutFieldSlice by recycling the wrapper pointer (@thushan)
  • e119a84: expose a drop counter on MultiWriter to match RingBuffer (@thushan)
  • 6f0153d: fix caller off-by-one for Status/Group/Continue (3-frame paths were skipping 4) (@thushan)
  • b0c8db1: fix doc drift (AtomicLevel) and make banner box corners consistently single-line (@thushan)
  • c973e95: fix field corruption when LogEntry prepends base fields into a shared backing array (@thushan)
  • bbd93e9: fix visibleLen to skip OSC 8 hyperlink escape sequences in column-width maths (@thushan)
  • 934c610: guard logStatusStructuredWithFields mw nil-check under RLock to prevent race (@thushan)
  • 0211670: halve syscalls per JSON entry by appending the newline to the buffer before writing (@thushan)
  • 9542fd7: make isTerminal use term.IsTerminal for any *os.File, not just the three std streams (@thushan)
  • fface90: mark the release v2.1.0 and note CallerEnabled as a new feature (@thushan)
  • cab9251: merge v2.1 performance, concurrency and correctness fixes (@thushan)
  • a3dc63c: replace UnsafeString of stack-local buffer in FieldValueToString with FormatInt (@thushan)
  • 8c6b9f4: resolve slog record.PC into caller fields when velocity caller capture is enabled (@thushan)
  • 790311b: return a singleton nop logger from FromContext on miss instead of allocating each time (@thushan)
  • 2031e00: run gofumpt across themes, examples and tests (@thushan)
  • 7cbb123: stop ring-buffer flusher busy-polling when idle by parking on a write signal channel (@thushan)
  • d4ea3a3: switch MultiWriter.Write to RLock so concurrent writes don't serialise on a single mutex (@thushan)
  • 2691b1d: tidy struct field alignment and gofumpt formatting (@thushan)
  • 440e042: update changelog with v2.0.3 bug-fix entries (@thushan)

Docs: pkg.go.dev/github.com/tensorfoundrylabs/velocity