Previous: posix log-files config, Up: posix log-files [Index]
The following bindings are exported by the library (vicare posix
log-files)
.
If logging is enabled: configure the log port; return unspecified
values. If the selected pathname is -
assume the log messages
must go to the current error port. Otherwise open a log file.
This function makes use of the following parameters:
logging-enabled?
If set to true consider logging enabled, else do nothing and return.
log-pathname
Used to retrieve the configured log file pathname.
log-port
Used to store the Scheme textual output port to which log messages are sent.
Close the current log port unless it is the console error port or the configured log file pathname is a single dash; return unspecified values.
This function makes use of the following parameters:
log-pathname
Used to retrieve the configured log file pathname and check if it is a single dash.
log-port
Used to retrieve current log port.
Notice that the logging-enabled?
parameter is ignored.
Call open-logging
and push a call to close-logging
on the
current compensations stack.
If logging is enabled: format a log message and write it to the current log port; return unspecified values.
template must be a format
–like string expecting as many
values as there are arg arguments. It is usual, but not
mandatory, to output log messages as single lines.
A log message is composed as follows:
log-prefix
.
If logging is enabled: format a log message extracting the message from
the condition object condition; return unspecified values. The
template is expected to contain a ~a
sequence to be replaced by
the condition message.
Evaluate the ?body forms; in case of exception: log a message with
log-condition-message
and raise it again.
condition-message
must be the identifier exported by the library
(rnrs rnrs (6))
. ?template must be an expression evaluating to
a string template suitable to be used as first argument to
log-condition-message
.
Previous: posix log-files config, Up: posix log-files [Index]