Skip to content

v1.2.1

Choose a tag to compare

@semihalev semihalev released this 07 Jun 15:34
· 22 commits to main since this release

What's Changed

✨ Major Enhancement

  • Standard io.Writer Support: zlog now uses Go's standard io.Writer interface instead of a custom Writer type. This provides full compatibility with the Go ecosystem while maintaining the same extreme performance.

🚀 Performance Improvements

  • Disabled logging: Improved from 1.28 ns/op to 0.24 ns/op (5.4x faster)
  • Removed atomic operations for log level checks (since levels are set once at startup)
  • All benchmarks maintain or improve their performance

🔧 Technical Changes

  • Replace custom Writer type with standard io.Writer
  • Update all built-in writers (Terminal, MMap, Async) to properly implement io.Writer
  • Remove unnecessary bufio usage in tests
  • Update documentation and examples

📦 Compatibility

This change makes zlog compatible with any Go io.Writer:

  • Files (os.File)
  • Network connections
  • bytes.Buffer
  • io.MultiWriter
  • Any custom writer implementation

The library maintains its position as the world's fastest Go logging library while now being more idiomatic and compatible with the Go ecosystem.

Full Changelog: v1.2.0...v1.2.1