Sha256: 1518e5b90dfc32996770fe6ca6d4858ce0518d2c266bc6ec7f873e09eb6de838

Contents?: true

Size: 733 Bytes

Versions: 32

Compression:

Stored size: 733 Bytes

Contents

require 'logger'

module Appium
  module Logger
    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) }
      end

      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
        end
      end
    end # class << self
  end # module Logger
end # module Appium

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
appium_lib-9.4.9 lib/appium_lib/logger.rb
appium_lib-9.4.8 lib/appium_lib/logger.rb
appium_lib-9.4.7 lib/appium_lib/logger.rb
appium_lib-9.4.6 lib/appium_lib/logger.rb
appium_lib-9.4.5 lib/appium_lib/logger.rb
appium_lib-9.4.4 lib/appium_lib/logger.rb
appium_lib-9.4.3 lib/appium_lib/logger.rb
appium_lib-9.4.2 lib/appium_lib/logger.rb
appium_lib-9.4.1 lib/appium_lib/logger.rb
appium_lib-9.4.0 lib/appium_lib/logger.rb
appium_lib-9.3.8 lib/appium_lib/logger.rb
appium_lib-9.3.7 lib/appium_lib/logger.rb
appium_lib-9.3.6 lib/appium_lib/logger.rb
appium_lib-9.3.5 lib/appium_lib/logger.rb
appium_lib-9.3.4 lib/appium_lib/logger.rb
appium_lib-9.3.3 lib/appium_lib/logger.rb
appium_lib-9.3.2 lib/appium_lib/logger.rb
appium_lib-9.3.1 lib/appium_lib/logger.rb
appium_lib-9.3.0 lib/appium_lib/logger.rb
appium_lib-9.2.0 lib/appium_lib/logger.rb