Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added 'verbose' flag to turn on logging for all http requests #82

Closed
wants to merge 1 commit into from

Conversation

cloocher
Copy link

added 'verbose' flag to turn on logging for all http requests useful for debugging issues

@kurioscreative
Copy link

If I shape up the merge conflicts here, would this be merged?

@bezborodow
Copy link

An alternative to logging is to use mitmproxy to intercept the HTTP traffic (also supports HTTPS.)

Set the proxy option to http://localhost:8080 when instantiating the consumer. All requests will end up in the mitmproxy console window for inspection.

@@ -321,6 +328,8 @@ def create_http(_url = nil)
http_object.read_timeout = http_object.open_timeout = @options[:timeout] || 30
http_object.open_timeout = @options[:open_timeout] if @options[:open_timeout]

http_object.set_debug_output($stdout) if @options[:verbose]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about:

case @options[:verbose]
when false, nil
  nil
when true
  http_object.set_debug_output($stdout)
else
  http_object.set_debug_output(@options[:verbose])
end

@ch1ago
Copy link
Member

ch1ago commented Apr 22, 2016

@cloocher can we get a rebase here? I love the code.

@ch1ago
Copy link
Member

ch1ago commented Apr 22, 2016

I am reopening it so as to trigger TravisCI.

@ch1ago ch1ago closed this Apr 22, 2016
@ch1ago ch1ago reopened this Apr 22, 2016
@ch1ago ch1ago closed this Apr 22, 2016
@ch1ago
Copy link
Member

ch1ago commented Apr 22, 2016

I am reopening it so as to trigger TravisCI.

1 similar comment
@ch1ago
Copy link
Member

ch1ago commented Apr 22, 2016

I am reopening it so as to trigger TravisCI.

@ch1ago ch1ago reopened this Apr 22, 2016
@ch1ago
Copy link
Member

ch1ago commented Apr 22, 2016

@cloocher @kurioscreative @dbezborodovrp could any of you please rebase this PR?

@ch1ago
Copy link
Member

ch1ago commented Apr 22, 2016

Updated: I love the tests too. ❤️ 😍

@ch1ago
Copy link
Member

ch1ago commented Apr 28, 2016

I have reimplemented the improvement

ch1ago added a commit that referenced this pull request Apr 28, 2016
@ch1ago ch1ago closed this in #119 Apr 28, 2016
ch1ago added a commit that referenced this pull request Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants