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
9 10 11 |
# File 'lib/logstasher/active_support/mailer_log_subscriber.rb', line 9 def deliver(event) process_event(event, %w[mailer deliver]) end |
#logger ⇒ Object
26 27 28 |
# File 'lib/logstasher/active_support/mailer_log_subscriber.rb', line 26 def logger LogStasher.logger end |
#process(event) ⇒ Object
22 23 24 |
# File 'lib/logstasher/active_support/mailer_log_subscriber.rb', line 22 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.
18 19 20 |
# File 'lib/logstasher/active_support/mailer_log_subscriber.rb', line 18 def receive(event) process_event(event, %w[mailer receive]) end |