Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8000 (closed enhancement: fixed)

Opened 2 years ago

Last modified 10 months ago

[PATCH] Make ActionMailer logging less noisy

Reported by: iaddict Assigned to: core
Priority: normal Milestone: 1.2.7
Component: ActionMailer Version: edge
Severity: normal Keywords: ActionMailer logging verified
Cc: tarmo

Description

ActionMailer dumps the whole encoded mail to the logfile (with log_level <= :info) This can lead to fast growing logfiles especially when attachments are used.

With this patch applied only if log_level is <= :debug the whole message gets logged, otherwise only the receivers are logged.

Attachments

action_mailer_logging_patch.diff (0.7 kB) - added by iaddict on 04/04/07 19:09:55.
less_verbose_action_mailer_logging.patch (1.2 kB) - added by tarmo on 08/25/07 06:42:17.
Rebased patch and fixed test.

Change History

04/04/07 19:09:55 changed by iaddict

  • attachment action_mailer_logging_patch.diff added.

08/25/07 06:42:17 changed by tarmo

  • attachment less_verbose_action_mailer_logging.patch added.

Rebased patch and fixed test.

08/25/07 06:43:30 changed by tarmo

  • cc set to tarmo.

No point in logging the whole e-mail body in production.

+1

09/21/07 16:33:27 changed by jwarchol

Might be good to note what mailer action did the sending. Patch applied fine for me, test works, verfied in an app.

+1

01/30/08 18:08:13 changed by nuttycom

+1 This is nice - the verbose logging in production does tend to make the logs a bit bloated. Works for me!

01/30/08 18:09:10 changed by jwarchol

  • keywords changed from ActionMailer logging to ActionMailer logging verified.

02/02/08 05:32:19 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [8781]) Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. Closes #8000.