Repository navigation
v1.13.0
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.
- You can now access the default standard logger instance directly via
🐛 Bug Fixes
- Fix label persistence issue with
sync.Pool- Fixed a critical bug where labels set via
WithLabelswould disappear after the first log entry was written. - This was caused by the
LogEntryrecycling process clearing the map reference shared with the parentLogger. - 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.
- Fixed a critical bug where labels set via