Class: LogStasher::ActiveSupport::MailerLogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- LogStasher::ActiveSupport::MailerLogSubscriber
- Defined in:
- lib/logstasher/active_support/mailer_log_subscriber.rb
Constant Summary collapse
- MAILER_FIELDS =
%i[mailer action message_id from to].freeze
Instance Method Summary collapse
- #deliver(event) ⇒ Object
- #logger ⇒ Object
- #process(event) ⇒ Object
-
#receive(event) ⇒ Object
This method will only be invoked on Rails 6.0 and prior.
Instance Method Details
#deliver(event) ⇒ Object
11 12 13 |
# File 'lib/logstasher/active_support/mailer_log_subscriber.rb', line 11 def deliver(event) process_event(event, %w[mailer deliver]) end |
#logger ⇒ Object
28 29 30 |
# File 'lib/logstasher/active_support/mailer_log_subscriber.rb', line 28 def logger LogStasher.logger end |
#process(event) ⇒ Object
24 25 26 |
# File 'lib/logstasher/active_support/mailer_log_subscriber.rb', line 24 def process(event) process_event(event, %w[mailer process]) end |
#receive(event) ⇒ Object
This method will only be invoked on Rails 6.0 and prior. Starting in Rails 6.0 the receive method was deprecated in favor of ActionMailbox. The receive method was removed from ActionMailer in Rails 6.1, and there doesn’t appear to be corresponding instrumentation for ActionMailbox.
20 21 22 |
# File 'lib/logstasher/active_support/mailer_log_subscriber.rb', line 20 def receive(event) process_event(event, %w[mailer receive]) end |