|
||||||||||
|
||||||||||
Related Syntax | Other Library Functions |
function | log-message |
Library: builtins - functions for logging
Include: builtins.xin |
define external function log-message value stream message-text class value stream class-value optional initial {""} severity value integer severity-value optional initial {0} as log_message in function-library #builtin
This function is meant to be used as a general mechanism for error and status logging.
log-message
receives the error or status message and passes to it to whatever "-log" stream is bound to. If it is bound to "mylog.log", that file will receive the error or status message. This means that when you run your OmniMark program, log-message sends messages to mylog.log, while writing to #error sends text to standard error.
You can set the destination of log-message:
Note: You can also specify "-alog mylog.log" from the command line if you wish to append all log messages to the same file rather than overwriting the previous contents of the file each time there is a message.
log-message
is useful in batch environments, both because it gives access to the "-log" stream, and because it is invoked in a uniform manner in a server environment. It is useful in server environments because it provides a consistent interface to what can be a variety of message processing systems.
Arguments:
Related Syntax no-default-io |
Other Library Functions log-message |
---- |