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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue