message_hook/3 is supposed to intercept calls to print_message/2, thus making it possible to do something before executing print_message. That is how I understand it.
But this did not work with me. I have defined a message_hook for “information” type messages. But the are not intercepted, i.e. if I trace programm execution, message_hook is never called.
Where am I going wrong? What is my misconception? Or is there a bug in my prolog (SWI-Prolog version (threaded, 64 bits, version 8.2.4)?