How to find hooks being called by a Drupal page?
Use hook_module_implements_alter and do the drupal set message in here. You'll need to use a FAKE cache for the cache_bootstrap bin.

In your settings.php

if (!class_exists('DrupalFakeCache')) {
  $conf['cache_backends'][] = 'includes/cache-install.inc';
}
$conf['cache_class_cache_bootstrap'] = 'DrupalFakeCache';


I will say that hacking core in this case is the preferred way to do this. The person who wrote that linked article is a core maintainer; so they know what there talking about. Using hook_module_implements_alter with a fake cache backend will only make this fire on the first run of that hook. Additional calls to the hook will not be caught due to the static cache. Not using the static cache would require hacking core in this case.