-
Notifications
You must be signed in to change notification settings - Fork 0
logs cron.en_US
YanQS edited this page Dec 13, 2025
·
1 revision
-
pcn_log_table_max: maximum number of rows to keep in the DB table (default 1000). Set to 0 for no limit. -
pcn_logs_option_limit: when falling back towp_optionsfor log storage, the maximum number of entries to keep (default 200) to avoid oversized options.
- The plugin will attempt to create and write to the
{$wpdb->prefix}pcn_email_logstable when sending emails; if table creation or write fails it will fall back topcn_email_logsoption. - To prevent unbounded growth,
PCN_Settings::enforce_log_limits()performs:- Truncate the
pcn_email_logsoption, keeping only the latest N entries (pcn_logs_option_limit). - Delete oldest rows from the DB table to ensure the row count does not exceed
pcn_log_table_max.
- Truncate the
- The plugin schedules a daily event
pcn_daily_maintenanceon activation; that event callsPCN_Settings::enforce_log_limits(). - Manual run (WP-CLI):
wp eval 'PCN_Settings::enforce_log_limits();'
- Admin UI offers clear logs and export CSV operations; export supports filtering by number of days (0 for all).
- Recommendation: export and archive logs for long-term retention, then set a reasonable
pcn_log_table_max.