Class: Daneel::Logger

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

Instance Method Summary collapse

Constructor Details

#initialize(io = $stdout, verbose = false) ⇒ Logger

Returns a new instance of Logger.



6
7
8
9
10
11
12
# File 'lib/daneel/logger.rb', line 6

def initialize(io = $stdout, verbose = false)
  super
  self.level = Logger::INFO unless verbose
  self.formatter = proc do |severity, datetime, progname, msg|
    "#{severity} #{msg}\n"
  end
end

Instance Method Details

#inspectObject



14
15
16
# File 'lib/daneel/logger.rb', line 14

def inspect
  %|#<#{self.class}:#{object_id} @level=#{level}>|
end