Class: MonoLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/mono_logger.rb,
lib/mono_logger/version.rb

Overview

MonoLogger

A subclass of Ruby’s stdlib Logger with all the mutex and logrotation stuff ripped out.

Defined Under Namespace

Classes: LocklessLogDevice

Constant Summary collapse

VERSION =
"1.1.2"

Instance Method Summary collapse

Constructor Details

#initialize(logdev, shift_age = nil, shift_size = nil) ⇒ MonoLogger

Synopsis

MonoLogger.new(STDOUT)
MonoLogger.new(filename)

Args

logdev

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

shift_age

ignored in MonoLogger

shift_size

ignored in MonoLogger

Description

Create an instance.



30
31
32
33
34
35
36
# File 'lib/mono_logger.rb', line 30

def initialize(logdev, shift_age=nil, shift_size=nil)
  super(nil)

  if logdev
    @logdev = LocklessLogDevice.new(logdev)
  end
end