Class: Flnt::TeeableLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/flnt/teeable_logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Logger

#initialize, #method_missing, #tee!

Constructor Details

This class inherits a constructor from Flnt::Logger

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Flnt::Logger

Instance Attribute Details

#teed_loggerObject

Returns the value of attribute teed_logger.



6
7
8
# File 'lib/flnt/teeable_logger.rb', line 6

def teed_logger
  @teed_logger
end

Instance Method Details

#emit!(arg, tag: nil) ⇒ Object



8
9
10
11
12
13
# File 'lib/flnt/teeable_logger.rb', line 8

def emit!(arg, tag: nil)
  level = __get_last_tag!(tag || @tag)
  level = 'info' unless %w(debug info warn error fatal).include?(level)
  teed_logger.send(level, arg)
  super
end