Log Retention Periods and Alerts

Overview

Email logs provide a quick way to view messages sent from your website without leaving your WordPress dashboard.

Debug logs record errors encountered with your integration and/or the sending of your emails. It provides a trace of the sending process, which assists in detecting and diagnosing problems.

Logged events are stored in the database, within the gravitysmtp_events table, and the size of your database can significantly impact performance if left unmanaged. Large logs can:

  • Reduce WordPress performance.
  • Affect database backup and recovery times.
  • Slow down page loads in the SMTP interface.

Retention Settings

Retention settings are located under the SMTP → Settings → Logging option. View our Settings reference guide for more information.

Log Size Alerts

When activated, Gravity SMTP will display an alert to notify you of the impacts mentioned above. These serve as a reminder to review and adjust your retention period settings regularly.

Image showing alert message when Email log is enabled
Image showing alert message when Debug log is enabled

Best Practices

Log growth rates and sizes are unique to the environment you have Gravity SMTP installed in, but here are some simple practices that can help reduce your log sizes to avoid a negative impact on your WordPress installation.

StrategyDescription
Disable Debug LoggingDebug logging is disabled by default; it should only be enabled when troubleshooting is necessary. Keeping it off during regular operation prevents unnecessary database writes.
Reduce retention period when possibleWhen using logging, choose the shortest retention period possible to avoid storing excess information.
Disable Save Email BodySee Settings. Save space by not storing the whole body of sent emails. See note below.
Disable Save AttachmentsSee Settings. Save space by not saving attachments in the uploads folder. See note below.
Delete Log ManuallyUse the button on the Settings page to purge the logs manually.
Manually prune the attachments folderIf necessary, disk space on your server can be recovered by pruning the folder: uploads/gravitysmtp/attachments/[EMAIL LOG ID]/. Taking a backup first is always recommended. See note below.

Note: Disabling or deleting email logs or attachments removes the ability to view or resend the related emails.