1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix ActionMailer::LogSubscriber to use the correct log level check.

This commit is contained in:
Brian Durand 2012-09-19 16:46:48 -07:00
parent 19f0e37d7a
commit d47fde6dcb

View file

@ -1,14 +1,14 @@
module ActionMailer
class LogSubscriber < ActiveSupport::LogSubscriber
def deliver(event)
return unless logger.debug?
return unless logger.info?
recipients = Array(event.payload[:to]).join(', ')
info("\nSent mail to #{recipients} (#{event.duration.round(1)}ms)")
debug(event.payload[:mail])
end
def receive(event)
return unless logger.debug?
return unless logger.info?
info("\nReceived mail (#{event.duration.round(1)}ms)")
debug(event.payload[:mail])
end