lib/restfulie/common/logger.rb in restfulie-0.8.0 vs lib/restfulie/common/logger.rb in restfulie-0.8.1

- old
+ new

@@ -1,11 +1,19 @@ -module Restfulie::Common::Logger - # Configure the logger used by Restfulie - # - # The logger defaults to ActiveSupport::BufferedLogger.new(STDOUT) - class << self - attr_accessor :logger +module Restfulie + module Common + class Logger + # Configure the logger used by Restfulie + # + # The logger defaults to ActiveSupport::BufferedLogger.new(STDOUT) + def self.logger + @@logger + end + + def self.logger=(value) + @@logger = value + end + + @@logger = ActiveSupport::BufferedLogger.new(STDOUT) + @@logger.level = ::Logger::DEBUG + end end end - -Restfulie::Common::Logger.logger = ActiveSupport::BufferedLogger.new(STDOUT) -Restfulie::Common::Logger.logger.level = Logger::DEBUG