Class: Footprint::Log::Basic

Inherits:
Logger
  • Object
show all
Defined in:
lib/footprint/log/basic.rb

Overview

Class that extends the Ruby Logger.

Does nothing extra except setting the default logdev as nil but will be used to add generic configuration in the future since other Footprint::Log classes extend this.

Direct Known Subclasses

ErrorFile, OutFile

Instance Method Summary collapse

Constructor Details

#initialize(logdev = nil, shift_age = 0, shift_size = 1048576) ⇒ Basic

Synopsis

Footprint::Log::Basic.new(name, shift_age = 7, shift_size = 1048576)
Footprint::Log::Basic.new(name, shift_age = 'weekly')

Args

logdev

The log device. This is a filename (String) or IO object (typically STDOUT, STDERR, or an open file, defaults to nil).

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).

Description

Create an instance with logdev as nil.


34
35
36
# File 'lib/footprint/log/basic.rb', line 34

def initialize logdev = nil, shift_age = 0, shift_size = 1048576
  super
end