No release in over a year
Lograge for ActionMailer.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 12.3.3

Runtime

>= 5, < 7.1
> 0.11
 Project Readme

Lograge::ActionMailer

You get a single line with all the important information, like this:

 "status":"delivered","mailer":"UserMailer","message_id":"61e6b06c20d63_323a76b547849c@application-dev.mail","duration":"855.3ms"

Installation

In your Gemfile:

gem 'lograge'
gem 'lograge-action-mailer'

Enable it in an initializer or the relevant environment config:

# config/initializers/lograge.rb
# OR
# config/environments/production.rb
Rails.application.configure do
  config.lograge.action_mailer.enabled = true
end

To further clean up your logging, you can also tell Lograge to skip log messages meeting given criteria. You can skip log messages generated from ActionMailer events:

Rails.application.configure do
  config.lograge.action_mailer.ignore_events = ["process"]
end

License

The gem is available as open source under the terms of the MIT License.