-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Description
Hi there!
It would be nice to pass a custom logger to Mailgun::Client / Faraday for debugging like in Faraday documentation :
conn = Faraday.new(url: 'http://httpbingo.org') do |faraday|
faraday.response :logger, MyLogger.new($stdout)
endmailgun-ruby/lib/mailgun/client.rb
Lines 35 to 42 in 74db0e4
| @http_client = Faraday.new(request_options) do |conn| | |
| conn.request :multipart | |
| conn.request :authorization, :basic, 'api', api_key | |
| conn.request :url_encoded | |
| conn.response :raise_error, include_request: true | |
| conn.adapter Faraday.default_adapter | |
| conn.options.params_encoder = Faraday::FlatParamsEncoder | |
| end |
See: https://lostisland.github.io/faraday/#/middleware/included/logging?id=customize-the-logger
Unfortunately Mailgun::Client constructor is not easy to use with positional arguments. It would be easier with keyword arguments.
So I would suggest to deprecate positional arguments and switch to keyword arguments first.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels