Module: Newman::EmailLogger
- Defined in:
- lib/newman/email_logger.rb
Instance Method Summary collapse
-
#log_email(logger, prefix, email) ⇒ Object
‘Newman::EmailLogger#log_email` takes a logger object, a prefix, and a `Mail` object and then outputs relevant debugging details.
Instance Method Details
#log_email(logger, prefix, email) ⇒ Object
‘Newman::EmailLogger#log_email` takes a logger object, a prefix, and a `Mail` object and then outputs relevant debugging details.
This method always at least provides a summary of the provided ‘email` at the `INFO` level When in debugging mode, the full contents of the `email` will also gets logged.
The main purpose of this method is to be used by ‘Newman::RequestLogger` and `Newman::ResponseLogger`, but may also optionally be used as a helper for those who are rolling their own logging functionality.
30 31 32 33 |
# File 'lib/newman/email_logger.rb', line 30 def log_email(logger, prefix, email) logger.debug(prefix) { "\n#{email}" } logger.info(prefix) { email_summary(email) } end |