Environment
- OS: Windows Server (service via Apache Commons Daemon / prunsrv)
- JRuby: 9.4.12.0 (OpenJDK 21)
- logger: 1.6.6 (broken) / 1.6.2 (works)
- Rails: 7.2, Puma single process (no workers)
Summary
After upgrading to logger 1.6.6, daily log rotation is silently skipped on JRuby/Windows.
Pinning logger to 1.6.2 restores rotation.
This is different from jruby/jruby#8801 (UnsatisfiedLinkError on flock).
We do not crash; rotation simply never happens.
Suspected cause
I observed that File.identical?(lock, dev) returns false
On our host, after fixup_mode, @dev fails the second identical? check:
(File.identical?(path, lock) rescue false)=true
(File.identical?(lock, dev) rescue false)=false
So lock_shift_log never yields -> shift_log_period never runs.
Reproduction(conceptual)
require "logger"
# With logger 1.6.6 on JRuby/Windows:
log = Logger.new("web-output.log", "daily")
# Force rotation due, then write:
# -> no archive created; same file continues
# With logger 1.6.2:
# -> archive created (e.g. web-output.log.YYYYMMDD)
Environment
Summary
After upgrading to logger 1.6.6, daily log rotation is silently skipped on JRuby/Windows.
Pinning logger to 1.6.2 restores rotation.
This is different from jruby/jruby#8801 (UnsatisfiedLinkError on
flock).We do not crash; rotation simply never happens.
Suspected cause
I observed that
File.identical?(lock, dev)returnsfalseOn our host, after
fixup_mode,@devfails the second identical? check:(File.identical?(path, lock) rescue false)=true(File.identical?(lock, dev) rescue false)=falseSo
lock_shift_lognever yields ->shift_log_periodnever runs.Reproduction(conceptual)