Next: mpg-ref-print_profile, Previous: mpg-ref-print_message, Up: mpg-bpr [Contents][Index]
print_message_lines/3
print_message_lines(+Stream, +Severity, +Lines)
Print the Lines to Stream, preceding each line with a prefix corresponding to Severity.
stream_object, must be ground
Any valid output stream.
one of [query,help,informational,warning,error,silent,term]
list of list of pair
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, then the prefix will be as described
for print_message/2
, otherwise Severity itself will be
used as the prefix. If Severity is query
, then 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, then the arguments are those provided by
the system.
Stream errors (see ref-iou-sfh-est), plus:
instantiation_error
type_error
in Lines.
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).