twalpole / apparition

Capybara driver for Chrome using CDP
MIT License
363 stars 46 forks source link

Logger without public puts method crashes #57

Closed dorner closed 4 years ago

dorner commented 4 years ago

The default Logger class in Ruby does not have a public puts method: https://ruby-doc.org/stdlib-2.6.3/libdoc/logger/rdoc/Logger.html

When trying to set the browser logger to something like Logger.new(nil) to essentially prevent all output, this crashes since it doesn't have a puts statement.

Is there a reason we're using puts instead of debug, info, write, etc.?

twalpole commented 4 years ago

Yes - because this gem was designed to ease the transition off Poltergeist and that's what the Poltergeist logger option provided. If you'd like to provide a PR that enhances that it would be considered.