message_hook(Message, Kind, Component, Tokens)
User-defined hook method for intercepting printing of a message, declared in the logtalk
built-in object as a public, multifile, and dynamic predicate. This hook method is automatically called by the print_message/3
method. When the call succeeds, the print_message/3
method assumes that the message have been successfully printed.
message_hook(@callable, @callable, @callable, @list(nonvar))
(none)
:- multifile(logtalk::message_hook/4). :- dynamic(logtalk::message_hook/4). % print silent messages instead of discarding them as default logtalk::message_hook(_, silent, core, Tokens) :- logtalk::message_prefix_stream(silent, core, Prefix, Stream), logtalk::print_message_tokens(Stream, Prefix, Tokens).