Manipulates the system message log.
set-system-message-log &key stream collect get callback => result
An output stream designator, or
A boolean, or
A function designator, or
A list of strings, or
set-system-message-log manipulates the system message log. This log is used by the system to produce messages that indicate that something is not as expected, but is not an error. For example, putting a bad Break-Gesture in a GTK resource file.
If stream is
t or a stream, the system message log stream is set, with
*standard-output*. This stream is used when writing messages.
When collect is true but not
:no-change, messages are collected in an internal list, which can be retrieved by using get.
callback can be a designator for a function of one argument, a string. This function is called when a message is generated. The callback must not try to perform GUI operations.
The default value of each of stream, collect and callback is
:no-change, which does not change the current setting.
When get is supplied
set-system-message-log returns a list of the messages that has been collected. Each message is a single string. If get is
t, the internal list is reset to
nil. If get is :keep, the internal list is not reset, so the next call with get will get them again.
nil if get is not supplied.
set-system-message-log returns the list of collected messages if get is supplied.
stream, callback and collect are mutually independent. It is possible to set the system to any combination of these.
The order of operation when a message is generated is first to print, then call the callback, and then collect.
When collecting messages it can accumulate, so it is important to periodically get the message to ensure it does not bloat the memory.
t when it is already collecting has no effect, in particular it does not affect the list of collected messages.
LispWorks User Guide and Reference Manual - 20 Sep 2017