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:
parent
19f0e37d7a
commit
d47fde6dcb
1 changed files with 2 additions and 2 deletions
|
@ -1,14 +1,14 @@
|
||||||
module ActionMailer
|
module ActionMailer
|
||||||
class LogSubscriber < ActiveSupport::LogSubscriber
|
class LogSubscriber < ActiveSupport::LogSubscriber
|
||||||
def deliver(event)
|
def deliver(event)
|
||||||
return unless logger.debug?
|
return unless logger.info?
|
||||||
recipients = Array(event.payload[:to]).join(', ')
|
recipients = Array(event.payload[:to]).join(', ')
|
||||||
info("\nSent mail to #{recipients} (#{event.duration.round(1)}ms)")
|
info("\nSent mail to #{recipients} (#{event.duration.round(1)}ms)")
|
||||||
debug(event.payload[:mail])
|
debug(event.payload[:mail])
|
||||||
end
|
end
|
||||||
|
|
||||||
def receive(event)
|
def receive(event)
|
||||||
return unless logger.debug?
|
return unless logger.info?
|
||||||
info("\nReceived mail (#{event.duration.round(1)}ms)")
|
info("\nReceived mail (#{event.duration.round(1)}ms)")
|
||||||
debug(event.payload[:mail])
|
debug(event.payload[:mail])
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue