Class: Miam::Logger

Inherits:
Logger
  • Object
show all
Includes:
Singleton
Defined in:
lib/miam/logger.rb

Defined Under Namespace

Modules: Helper

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.


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

def initialize
  super($stdout)

  self.formatter = proc do |severity, datetime, progname, msg|
    "#{msg}\n"
  end

  self.level = Logger::INFO
end

Instance Method Details

#set_debug(value) ⇒ Object


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

def set_debug(value)
  self.level = value ? Logger::DEBUG : Logger::INFO
end