Class: UU::Log

Inherits:
Object
  • Object
show all
Includes:
LogContext, Loggable
Defined in:
lib/uu/log.rb

Instance Attribute Summary collapse

Attributes included from LogContext

#context

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Loggable

included

Methods included from LogContext

#with

Constructor Details

#initializeLog

Returns a new instance of Log.



12
13
14
15
16
17
# File 'lib/uu/log.rb', line 12

def initialize
  @loggers = {
    stderr: LoggerStderr.new(self),
    fluent: LoggerFluent.new(self),
  }
end

Instance Attribute Details

#loggersObject

Returns the value of attribute loggers.



19
20
21
# File 'lib/uu/log.rb', line 19

def loggers
  @loggers
end

Class Method Details

.instanceObject



8
9
10
# File 'lib/uu/log.rb', line 8

def self.instance
  Thread.current[:logger] ||= new
end