Class: ActionMailer::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- ActionMailer::LogSubscriber
- Defined in:
- actionmailer/lib/action_mailer/log_subscriber.rb
Constant Summary
Constants inherited from ActiveSupport::LogSubscriber
BLACK, BLUE, BOLD, CLEAR, CYAN, GREEN, MAGENTA, RED, WHITE, YELLOW
Instance Method Summary (collapse)
Methods inherited from ActiveSupport::LogSubscriber
attach_to, #call, flush_all!, flushable_loggers, log_subscribers, logger
Instance Method Details
- (Object) deliver(event)
5 6 7 8 9 |
# File 'actionmailer/lib/action_mailer/log_subscriber.rb', line 5 def deliver(event) recipients = Array.wrap(event.payload[:to]).join(', ') info("\nSent mail to #{recipients} (%1.fms)" % event.duration) debug(event.payload[:mail]) end |
- (Object) logger
16 17 18 |
# File 'actionmailer/lib/action_mailer/log_subscriber.rb', line 16 def logger ActionMailer::Base.logger end |
- (Object) receive(event)
11 12 13 14 |
# File 'actionmailer/lib/action_mailer/log_subscriber.rb', line 11 def receive(event) info("\nReceived mail (%.1fms)" % event.duration) debug(event.payload[:mail]) end |