truemail-rb / truemail

🚀 Configurable framework agnostic plain Ruby 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists.
https://truemail-rb.org/truemail-gem
MIT License
1.18k stars 59 forks source link

[FEATURE] Ability to use custom logger in event logger #288

Closed bestwebua closed 6 months ago

bestwebua commented 6 months ago

By default Truemail uses default logger class from Ruby stdlib, Logger. But nice to have an ability to override this behavior passing own class in logger configuration.

Truemail.configure do |config|
  config.logger = {
    logger_class: MyCustomLogger,
    tracking_event: :all,
    stdout: true,
    log_absolute_path: '/home/app/log/truemail.log'
    }
end
bestwebua commented 6 months ago

Already in the latest release.