For each mail sent, there is at least one log entry created, even when sent successfully. This might fill up you watchdog history quite quickly and have other messages purged. Sometimes you just don't want to keep an SMTP log (for example when sending a lot of mails).

This patch adds an option to disable watchdog logging.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wundo’s picture

Status: Needs review » Needs work

error: smtp.mail.inc: patch does not apply

Could you please re-roll?

interX’s picture

Status: Needs work » Needs review
FileSize
7.1 KB

Here's a reroll against the latest dev (and slightly modified)

interX’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
esolitos’s picture

Issue summary: View changes

Is there any plan to get this committed? I found this veeery useful!

webservant316’s picture

yes I concur. I have the patch installed and depend upon it.

frankcarey’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed it and it looks right to me. Note the patch only works with the 7.x-1.x-dev version (not 1.0)

The last submitted patch, smtp-option-to-disable-logging.patch, failed testing.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: smtp-option-to-disable-logging-1937416.patch, failed testing.

wundo’s picture

Here are a couple of changes I wanted to see before committing this:

  • Re-roll against latest 7.x-1.x branch
  • Unify existing smtp_debugging variable and the patch proposed's variable, IMHO ideally the interface for this should be a select
mkolar’s picture

FileSize
7.35 KB

Here is re-roll against 7.x-1.x branch.
Patch slightly changed, I used old smtp_debugging variable and added update hook where I'm changing logging only errors if old variable was 1. Hope it's as you wanted.

By the way patch https://www.drupal.org/node/1292490 should be changed regarding this new behavior (Im going to do it).

mkolar’s picture

I'm sorry I accidentally used wrong node id and title in patch name because was working with more patches in one time :( I can't change it.

mkolar’s picture

Status: Needs work » Needs review
Fabianx’s picture

Status: Needs review » Reviewed & tested by the community
mkolar’s picture

I used wrong variable from old patch in some places. Here is the fix. File name is correct now I hope :).

mkolar’s picture

Status: Reviewed & tested by the community » Needs review
Fabianx’s picture

Status: Needs review » Reviewed & tested by the community
mkolar’s picture

Title: Disable watchdog logging » Watchdog logging verbose settings
Assigned: Unassigned » mkolar
wundo’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
8.42 KB

Sorry to change from RTBC to needs review, but I've basically re-wrote the whole patch fixing some confusion about the default logging level, doxygen errors, and standardizing using the logging level constants across the whole module.

Fabianx’s picture

Status: Needs review » Reviewed & tested by the community

Looks still good to me.

wundo’s picture

Status: Reviewed & tested by the community » Fixed

  • wundo committed 01a40d4 on 7.x-1.x
    Issue #1937416 by wundo: Using defined constants inside hook_update_N,...
  • wundo committed 3d29a8a on 7.x-1.x
    Issue #1937416 by wundo: Fixing doxygen inside smtp.install
    
  • wundo committed 4a02a5b on 7.x-1.x authored by mkolar
    Issue #1937416 by mkolar, interX, wundo, Fabianx: Watchdog logging...
  • wundo committed b34e7c6 on 7.x-1.x
    Issue #1937416 by wundo: Changing SMTP_LOGGING_ERRORS level to be the...
  • wundo committed c7db119 on 7.x-1.x
    Issue #1937416 by mkolar, interX, wundo, Fabianx: Watchdog logging...
  • wundo committed cce0b7a on 7.x-1.x
    Issue #1937416 by wundo: Calling variable_get('smtp_debugging') only...
  • wundo committed d68b499 on 7.x-1.x
    Issue #1937416 by wundo: Calling variable_get('smtp_debugging') only...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.