By default, Blackhole Pro adds a line to the site/server error log for any invalid IP addresses. Fortunately invalid IP addresses are rare. But there are cases where an attack or some issue may result in lots of notices filling up the site logs. So this tutorial explains how to disable the error log notices otherwise added by Blackhole Pro.

About the Blackhole Error Notices

Currently Blackhole Pro adds only one type of notice to site error logs. It happens whenever a request is made by an invalid IP address. The added notice looks like this:

Invalid IP Address: VALUE-OF-INVALID-IP-ADDRESS...

Fortunately for most sites this is a rare occurrence. If you are getting LOTS of these, it should be investigated just in case there is some unforeseen technical issue or whatever. That is one reason why the notice is added, to alert the admin that something is amiss. If you decide to disable the error log notice, follow the steps in the next section.

Disable the Blackhole Error Notices

To disable all error notices, add the following code to your (child) theme’s functions.php or add via simple custom plugin:

function blackhole_pro_validate_ip_log($log, $ip) { return ''; }
add_filter('blackhole_pro_validate_ip_log', 'blackhole_pro_validate_ip_log', 10, 2);

Save changes upload and done. No editing is required, strictly plug-&-play.