Class: Vedeu::Logging::MonoLogger Private

Inherits:
Logger
  • Object
show all
Defined in:
lib/vedeu/logging/mono_logger.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Allows the creation of a lock-less log device.

Instance Method Summary collapse

Constructor Details

#initialize(logdev) ⇒ Vedeu::Logging::MonoLogger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create a trappable Logger instance.

Parameters:

  • logdev (String|IO)

    The filename (String) or IO object (typically STDOUT, STDERR or an open file).



18
19
20
21
22
23
24
25
# File 'lib/vedeu/logging/mono_logger.rb', line 18

def initialize(logdev)
  @progname          = 'Vedeu'
  @level             = Logger::DEBUG
  @default_formatter = Logger::Formatter.new
  @formatter         = nil

  @logdev = Vedeu::Logging::LocklessLogDevice.new(logdev) if logdev
end