Every message issued by the Prolog system is displayed using a single predicate:
print_message(
+Severity,
+Message)
Message is a term that encodes the message to be printed. The format of message terms is subject to change, but can be inspected in the file library('SU_messages') of the SICStus Prolog distribution.
The atom Severity specifies the type (or importance) of the message. The following table lists the severities known to the SICStus Prolog system, together with the line prefixes used in displaying messages of the given severity:
error | '! ' | for error messages
|
warning | '* ' | for warning messages
|
informational | '% ' | for informational messages
|
help | '' | for help messages
|
query | '' | for query texts (see Query Processing)
|
silent | '' | a special kind of message,
which normally does not produce any output, but can be intercepted by
hooks
|
print_message/2
is a built-in predicate, so that users can
invoke it to have their own messages processed in the same way as the
system messages.
The processing and printing of the messages is highly customizable. For example, this allows the user to change the language of the messages, or to make them appear in dialog windows rather than on the terminal.