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

Mailgun::Client custom logger #343

Open
n-rodriguez opened this issue Feb 8, 2025 · 0 comments
Open

Mailgun::Client custom logger #343

n-rodriguez opened this issue Feb 8, 2025 · 0 comments
Assignees

Comments

@n-rodriguez
Copy link
Contributor

n-rodriguez commented Feb 8, 2025

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)
end

https://github.com/mailgun/mailgun-ruby/blob/d6ffaa0d2ce27c88c45a8080ca5693e312a82803/lib/mailgun/client.rb#L35C1-L41

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!

@alex-leb alex-leb self-assigned this Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants