Forum: Ruby Logger in ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Vetrivel V. (Guest)
on 2009-02-24 10:03
Logger class in ruby.

Syntax of creating logger
          Logger.new(logdev, shift_age = 0, shift_size = 1048576)

Description
logdev:  The log device. This is a filename (String) or IO object
(typically STDOUT, STDERR, or an open file).

shift_age:  Number of old log files to keep, or frequency of rotation
(daily, weekly or monthly).

shift_size:  Maximum logfile size (only applies when shift_age is a
number

My question
         In shift_age field  we can specify the number of old log files
to keep, but i have to keep all the files.Is it possible in Logger? How?
Brian C. (Guest)
on 2009-02-24 11:28
Vetrivel V. wrote:

> My question
>          In shift_age field  we can specify the number of old log files
> to keep, but i have to keep all the files.Is it possible in Logger? How?

I suggest you look at the source code. It's probably installed in
/usr/lib/ruby/1.8/logger.rb or somewhere similar on your system.
This topic is locked and can not be replied to.