Since version 3.1 of Mailchimp for WordPress, the plugin comes with a debug log. This tool can be very helpful in debugging or monitoring background processes, without requiring your actual presence or actions.
By default, the plugin will only log somewhat critical errors it encounters, but you can configure the plugin to send more helpful information to the log. There are 4 different log levels, listed here from low to high.
- DEBUG: Detailed debug information
- INFO: all interesting events. Example: “Form 10: johndoe@email.com subscribed” or “eCommerce360: order 100 added”
- WARNING: Exceptional occurrences that are not errors. Example: “Email johndoe@email.com is already on the selected list.”
- ERROR: Runtime errors that do not require immediate action but should typically be logged and monitored. Example: errors returned by the Mailchimp API.
By default, the plugin will only log events of the “error” type.
If you want to send all events to the debug log, you can do that by changing “debug log level” setting on the MC4WP > Other page.
Alternatively, you can use the following filter hook.
add_filter( 'mc4wp_debug_log_level’, function() { return 'debug’; } );
This will configure the plugin to log all events, from simple “interesting” events to “errors” which may or may not require your action.
Changing the location of the debug log file
By default, the plugin will create a log file in your uploads directory. If you want to change this, please use the mc4wp_debug_log_file
filter.
add_filter('mc4wp_debug_log_file', function($file) {
return '/var/log/mc4wp-debug.log';
});