Project

General

Profile

Actions

Bug #16349

closed

Logger shift_age of 0 disables shift_size

Added by bughit (bug hit) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
[ruby-core:95852]

Description

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0