Class: VolumeSweeper::Utils::Log

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/volume_sweeper/utils/log.rb

Instance Method Summary collapse

Constructor Details

#initializeLog

Returns a new instance of Log.



9
10
11
12
# File 'lib/volume_sweeper/utils/log.rb', line 9

def initialize
  @logger = Logger.new STDOUT
  @logger.level = Logger::DEBUG
end

Instance Method Details

#msg(*message, level: :info) ⇒ Object



14
15
16
# File 'lib/volume_sweeper/utils/log.rb', line 14

def msg *message, level: :info
  @logger.send level.to_s, message.join('').to_s if @logger.respond_to?(level)
end