
The JS Error Logger dashboard widget
The plugin catches most JS errors, logs them, and displays them in a dashboard widget.
Here are some of its features:
The plugin cleans the log every 24 hours, to only keep the last 100 entries.
You may use the “jserrlog_max_log_entries” WP filter to enable more or less entries, by returning an integer: add_filter('jserrlog_max_log_entries',function(){return 200;})
Alter error data:
You may use the “jserrlog_pre_insert_error” WP filter to modify the error data before it’s inserted into the log file: add_filter('jserrlog_pre_insert_error',function($error_data){return $error_data;})
Trigger integrations:
You may use the “jserrlog_after_log” WP hook to trigger an action (Slack notification, etc.) after an error was logged: add_action('jserrlog_after_log',function($error_data){//do something})
Backup old errors:
You may use the “jserrlog_before_log_maintenance” WP hook to trigger an action (archive errors, etc.) before old errors are deleted: add_action('jserrlog_before_log_maintenance',function($errors){//do something})
The plugin works with multisite. There’s one error log per site.