lib/pacto/logger.rb in pacto-0.3.0.pre vs lib/pacto/logger.rb in pacto-0.3.0
- old
+ new
@@ -1,5 +1,7 @@
+require 'forwardable'
+
module Pacto
class Logger
include Singleton
extend Forwardable
@@ -7,16 +9,16 @@
def initialize
log ::Logger.new STDOUT
end
- def log log
+ def log(log)
@log = log
@log.level = default_level
@log.progname = 'Pacto'
end
- def level= level
+ def level=(level)
@log.level = log_levels.fetch(level, default_level)
end
def level
log_levels.key @log.level