taylorbrooks / closeio

A Ruby wrapper for the Close.io API
http://developer.close.com
MIT License
45 stars 57 forks source link

Faraday logging during tests #22

Closed chris-obv closed 9 years ago

chris-obv commented 9 years ago

Hey, I'm using this gem, but don't want the HTTP logs to show when I run tests in rspec. Perhaps you could have this turned off by default or give the user a way to disable it?

To get around this I forked this gem here, if anyone else wants to suppress the logs.

chris-obv commented 9 years ago

Nevermind! This can be done by setting the second argument to false when instantiating Closeio.

Closeio::Client.new(ENV['CLOSE_IO_API_KEY'], false)
taylorbrooks commented 9 years ago

@chrisjoywebb Yeah, I initially had logs turned on by default. Then added the ability to turn them off.

My preference would be to leave them off by default, but I don't know how that plays into SemVer and stuff. Hopefully people aren't relying on logs for anything critical.

What are your thoughts?

chris-obv commented 9 years ago

It's nice to have the option, that's for sure. Our main issue was that the logs were cluttering up our test results (hundreds of tests). It's very easy to disable logging though once you figure it out. Keeping them on by default might be best for some people, I'm not sure. Maybe add how one goes about disabling logging to the documentation?