Class: HubLink::SimpleLogger

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/hub_link/simple_logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(output = "hub_link.log") ⇒ SimpleLogger

Returns a new instance of SimpleLogger.



3
4
5
6
7
# File 'lib/hub_link/simple_logger.rb', line 3

def initialize(output = "hub_link.log")
  logger = Logger.new(output)
  logger.formatter = ->(_, datetime, _, msg) { "#{datetime} - #{msg}\n" }
  __setobj__(logger)
end