Sha256: 9fc698a26ad650248a93f8222afe4e359f382c38192bf17a95b5903964b6efef

Contents?: true

Size: 360 Bytes

Versions: 62

Compression:

Stored size: 360 Bytes

Contents

require 'logger'

module Puppeteer::DebugPrint
  if Puppeteer.env.debug?
    def debug_puts(*args, **kwargs)
      @__debug_logger ||= Logger.new($stdout)
      @__debug_logger.debug(*args, **kwargs)
    end

    def debug_print(*args)
      print(*args)
    end
  else
    def debug_puts(*args, **kwargs)
    end

    def debug_print(*args)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
puppeteer-ruby-0.45.6 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.45.5 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.45.4 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.45.3 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.45.2 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.45.2.alpha2 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.45.2.alpha1 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.45.1 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.45.0 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.44.3 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.44.2 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.44.1 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.44.0 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.43.1 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.43.0 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.42.0 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.41.0 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.40.7 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.40.6 lib/puppeteer/debug_print.rb
puppeteer-ruby-0.40.5 lib/puppeteer/debug_print.rb