(www server-utils log) module provides procedure generators for
writing log information to an output port. Each generator is conventionally
Return a string describing the
socket address object saddr. This is typically found as
the CDR of the accept return value.
AF_UNIX, return "localhost" unless (somehow) the
(sockaddr:path saddr) has non-
AF_INET the format is
where hostname is from
inet-ntoa and port is
For any other family, return what
Return a procedure that writes an HTTP response log entry to port. The procedure is called with args client, method, upath (strings or symbols) and status (either an atom or a list), and writes a one-line entry of the form:
CLIENT - - [YYYY-MM-DD:HH:MM:SS TZ] "METHOD UPATH" ST1 ST2...
where the ‘YYYY..TZ’ are the year, month, day, hour, minute,
second and timezone components, respectively, of the
representation of the current time; and ‘STn’ are the
space-separated elements of status.
Optional second arg gmtime? non-
#f means use
gmtime instead of
localtime. Optional third arg
stamp-format specifies a format string passed to
strftime to use for the timestamp portion that appears
between the square braces (default: "%Y-%m-%d:%H:%M:%S %Z").
Optional fourth arg method-pair? non-
#f means that
method is expected to be a pair
. vers), in which case the portion between the double quotes
becomes "meth upath vers". This is to support
excruciating conformity to Apache for the benefit of downstream
programs that might fall over less than gracefully otherwise. Please
enjoy the slack.
The buffering mode for port is set to line-buffered.