Skip to content

v1.13.0

Choose a tag to compare

@taknb2nch taknb2nch released this 10 Jan 10:23
· 21 commits to develop since this release
96e6190

v1.13.0

This release focuses on improving stability when reusing logger instances and enhancing developer experience with a new accessor.

✨ New Features

  • Add Default() accessor
    • You can now access the default standard logger instance directly via harelog.Default().
    • This enables creating child loggers with context (e.g., WithLabels) without the overhead of manual cloning or the "double-clone" penalty of previous patterns.

🐛 Bug Fixes

  • Fix label persistence issue with sync.Pool
    • Fixed a critical bug where labels set via WithLabels would disappear after the first log entry was written.
    • This was caused by the LogEntry recycling process clearing the map reference shared with the parent Logger.
    • The implementation now performs a deep copy of labels when creating a log entry, ensuring the parent Logger remains immutable and safe to reuse across multiple log calls.