print_message_lines/3
print_message_lines(
+Stream,
+Severity,
+Lines)
Print the Lines to Stream, preceding each line with a prefix corresponding to Severity.
Any valid output stream.
[query,help,informational,warning,error,silent,
term]
Must be of the form [
Line1,
Line2, ...]
, where each
Linei must be of the form
[
Control_1-Args_1,
Control_2-Args_2, ...]
.
If Severity is a valid severity, the prefix will be as described
for print_message/2
, otherwise Severity itself will be
used as the prefix. If Severity is query
, no newline is
written after the last line (otherwise, a newline is written).
This predicate is intended to be used in conjunction with
user:message_hook/3
. After a message is intercepted using
user:message_hook/3
, this command is used to print the lines.
If the hook has not been defined, the arguments are those provided by
the system.
Stream errors (see ref-iou-sfh-est), plus:
instantiation_error
type_error
Suppose you want to intercept messages and force them to go to a different stream:
user:message_hook(Severity, Message, Lines):- my_stream(MyStream), print_message_lines(MyStream, Severity, Lines).