lib/ridgepole/logger.rb in ridgepole-0.7.3.beta vs lib/ridgepole/logger.rb in ridgepole-0.7.3.beta2

- old
+ new

@@ -1,22 +1,24 @@ -class Ridgepole::Logger < ::Logger - include Singleton - cattr_accessor :verbose +module Ridgepole + class Logger < ::Logger + include Singleton + cattr_accessor :verbose - def initialize - super($stdout) + def initialize + super($stdout) - self.formatter = proc do |severity, datetime, progname, msg| - "#{msg}\n" + self.formatter = proc do |_severity, _datetime, _progname, msg| + "#{msg}\n" + end + + self.level = Logger::INFO end - self.level = Logger::INFO - end + def verbose_info(msg) + info(msg) if verbose + end - def verbose_info(msg) - info(msg) if verbose - end - - def set_debug(value) - self.level = value ? Logger::DEBUG : Logger::INFO + def debug=(value) + self.level = value ? Logger::DEBUG : Logger::INFO + end end end