Class: Ridgepole::Logger

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

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



8
9
10
11
12
13
14
15
16
# File 'lib/ridgepole/logger.rb', line 8

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



22
23
24
# File 'lib/ridgepole/logger.rb', line 22

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

#verbose_info(msg) ⇒ Object



18
19
20
# File 'lib/ridgepole/logger.rb', line 18

def verbose_info(msg)
  info(msg) if verbose
end