lib/appium_lib/logger.rb in appium_lib-6.0.0 vs lib/appium_lib/logger.rb in appium_lib-7.0.0

- old
+ new

@@ -5,21 +5,23 @@ class << self extend Forwardable def_delegators :logger, :ap, :fatal, :error, :warn, :info, :debug, :level, :level=, :formatter, :formatter= [:fatal, :error, :warn, :info, :debug].each do |level| - define_method("ap_#{level}") {|obj| logger.ap(obj, level) } + define_method("ap_#{level}") { |obj| logger.ap(obj, level) } end - private - + attr_writer :logger + + private + def logger @logger ||= begin logger = ::Logger.new($stdout) logger.level = ::Logger::WARN - logger.formatter = proc { |severity, datetime, progname, msg| "#{msg}\n" } # do no special formatting + logger.formatter = proc { |_severity, _datetime, _progname, msg| "#{msg}\n" } # do no special formatting logger end end end # class << self end # module Logger -end # module Appium \ No newline at end of file +end # module Appium