Class: Handiv::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/handiv/logger.rb

Constant Summary collapse

LOG_PREFIX =
'** [Handiv] '.freeze
LOG_LEVELS =
[:fatal, :error, :warn, :info, :debug].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Logger

Returns a new instance of Logger.



19
20
21
# File 'lib/handiv/logger.rb', line 19

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/handiv/logger.rb', line 5

def client
  @client
end

Instance Method Details

#loggerObject



23
24
25
# File 'lib/handiv/logger.rb', line 23

def logger
  custom_logger || default_logger
end