Class: Daneel::Logger
- Inherits:
-
Logger
- Object
- Logger
- Daneel::Logger
- Defined in:
- lib/daneel/logger.rb
Instance Method Summary collapse
-
#initialize(io = $stdout, verbose = false) ⇒ Logger
constructor
A new instance of Logger.
- #inspect ⇒ Object
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
#inspect ⇒ Object
14 15 16 |
# File 'lib/daneel/logger.rb', line 14 def inspect %|#<#{self.class}:#{object_id} @level=#{level}>| end |