All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

set-system-message-log

Function
Summary

Manipulates the system message log.

Package

hcl

Signature

set-system-message-log &key stream collect get callback => result

Arguments

stream

An output stream designator, or :no-change.

collect

A boolean, or :no-change.

get

t or :keep.

callback

A function designator, or :no-change.

Values

result

A list of strings, or nil.

Description

The function 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 t meaning *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.

set-system-message-log returns nil if get is not supplied.

set-system-message-log returns the list of collected messages if get is supplied.

Notes

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.

Using collect 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 - 13 Feb 2015

NextPrevUpTopContentsIndex