configure log message sink
() function configures
output for the kutil_log(3)
family of functions.
By default, these functions log to
and inherit the initial output buffering behaviour (see
() first redirects
. Then, regardless of whether
, the output buffering of the stream is
set to line buffered.
CGI scripts invoking long-running child processes via
should use this function with a valid
as the web server might wait for all
file descriptors to close before closing the request connection.
() function returns zero on
failure (system error) and non-zero on success. If
() fails to re-open
, the output stream may no longer be
operable: the caller should exit.
() function was written by
In most situations, file
is configured in the
default log directory, which is not writable to the CGI process. Thus,
must be pre-created and be writable to
the CGI process. Otherwise,
will fail to create the file and exit with failure.