Class: Acmaker::Logger

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

Defined Under Namespace

Modules: Helper

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



5
6
7
8
9
10
11
12
13
# File 'lib/acmaker/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

#debug(value) ⇒ Object



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

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