On this page:
top
up

2.10Basic LoggingπŸ”— i

package: web-server-lib
The web-server/dispatchers/dispatch-log module defines a dispatcher constructor for transparent logging of requests. Consider using the facilities in Logging instead, as it provides more flexibility.
Equivalent to (-> request? string? ).

Formats a request like its counterpart in Logging, but without the response code information.

Formats a request like its counterpart in Logging, but without the response code information.

Formats a request like Apache’s default. However, Apache’s default includes information about the response to a request, which this function does not have access to, so it defaults the last two fields to - and -.

Formats a request and a response to approximate the Combined Log Format. As this function does not have access to the size of the object returned to the client, it defaults the field to -.

Equivalent to (symbols 'parenthesized-default'extended'apache-default'combined).

procedure

( log-format->format id)format-req/c

Maps 'parenthesized-default to paren-format , 'extended to extended-format , 'apache-default to apache-default-format , and 'combined to combined-log-format

procedure

( make [#:formatformat#:log-pathlog-path])dispatcher/c

log-path:(or/c path-string? output-port? )="log"
Logs requests to log-path, which can be either a filepath or an output-port? , using format to format the requests. If format is a symbol, a log formatter will be tacitly made using log-format->format . Then invokes next-dispatcher .

Changed in version 1.3 of package web-server-lib: Allow log-path to be an output-port?
Changed in version 1.8: Allow format to be a symbol (more precisely, a log-format/c ).

top
up

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /