when use this appium ::logger in ruby, I have tried and got Failure/Error: @log = Appium::Logger::logger
NoMethodError: undefined method `new’ for Appium::Logger:Module.
the code for logger.rb inside appium :
lib/appium_lib/logger.rb
module Appium
module Logger
class << self
extend Forwardable
def_delegators :@logger, :warn, :error, :info
# @private
def logger
@logger ||= Logger.new
end
end # class << self
end # module Logger
end # module Appium
based on A.Winter suggestion, I will like to report a bug here.
"
Looks like this code is busted to me. line 9: Logger.new
should be ::Logger.new if it intends to use the class from the
standard library, instead of a Module trying to instantiate itself
(impossible!). Looks like a good opportunity for a bug report.
In the mean time you could just require ‘logger’ and
use your own Logger.new.
"
We should have the logger.rb file fix