1.3.8 (2025-10-15)
Fixes & Improvements
-
(4c2c743)
-
Eliminated multiple data races in concurrent rotations and mill goroutines.
Internal logic now snapshots configuration and system functions once for each logger instance to ensure safe concurrent use. -
Added deterministic shutdown for background goroutines (
millandscheduled rotation) viaWaitGroupsynchronization, preventing premature exits or leaks. -
Strengthened
Close()to wait safely for goroutine completion without holding locks. -
Improved test suite:
- Fake clock (
fakeCurrentTime) is now lock-protected to avoid race conditions. - Tests force UTC for consistent local-time behavior.
- CI now runs with
go test -raceto verify concurrency safety.
- Fake clock (
Internal Changes
- Introduced
resolveConfigLocked()for snapshotting logger configuration (time, compression, stat/rename/remove functions) at initialization. - Simplified mill and rotation goroutine lifecycle management.
- Minor refactoring for clarity and reduced global variable reads.