[ruby-core:95853] [Ruby master Bug#16349] Logger shift_age of 0 disables shift_size

From: hsbt@...
Date: 2019-11-15 01:09:25 UTC
List: ruby-core #95853
Issue #16349 has been updated by hsbt (Hiroshi SHIBATA).

Assignee set to sonots (Naotoshi Seo)
Status changed from Open to Assigned

----------------------------------------
Bug #16349: Logger shift_age of 0 disables shift_size
https://bugs.ruby-lang.org/issues/16349#change-82686

* Author: bughit (bug hit)
* Status: Assigned
* Priority: Normal
* Assignee: sonots (Naotoshi Seo)
* Target version: 
* ruby -v: 
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
shift_age is documented as: Number of old log files to keep, or frequency of rotation (daily, weekly or monthly). Default value is 0.
shift_size is documented: Maximum logfile size in bytes (only applies when shift_age is a number). Defaults to 1048576 (1MB).

Given the above, a shift_age of 0 should prevent the retention of old log files, but maximum size (shift_size) should still be enforced.

But it's not: https://github.com/ruby/ruby/blob/master/lib/logger/log_device.rb#L124

So either the behavior or the documentation is wrong.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next