Class: HubLink::SimpleLogger
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- HubLink::SimpleLogger
- Defined in:
- lib/hub_link/simple_logger.rb
Instance Method Summary collapse
-
#initialize(output = "hub_link.log") ⇒ SimpleLogger
constructor
A new instance of SimpleLogger.
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 |