Class: Kelbim::Logger

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

Defined Under Namespace

Modules: ClientHelper

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



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

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



15
16
17
# File 'lib/kelbim/logger.rb', line 15

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