Changeset 12528 in project for wiki/eggref


Ignore:
Timestamp:
11/16/08 15:28:52 (11 years ago)
Author:
sjamaan
Message:

Add info about logging support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/spiffy

    r12523 r12528  
    105105a static file.
    106106
     107<parameter>(spiffy-access-log [log-file-or-port])</parameter>
     108
     109Filename (string) or port to append access log output to.  Default:
     110{{#f}} (disabled)
     111
     112<parameter>(spiffy-error-log [log-file-or-port])</parameter>
     113
     114Filename (string) or port to which error messages from evaluated code
     115should be output. Default: {{(current-error-port)}}
     116
     117<parameter>(spiffy-debug-log [log-file-or-port])</parameter>
     118
     119Filename (string) or port to write debugging messages to.  Default:
     120{{#f}} (disabled)
     121
     122
    107123=== Handlers
    108124
     
    134150webroot (even though it points to no existing file). Defaults to a
    135151procedure which returns a "404 Not found".
     152
     153<parameter>(handle-access-logging [proc])</parameter>
     154
     155The handler for access logging. This is a procedure of zero arguments
     156which should write a line to the access log. Defaults to a procedure which
     157writes a line to {{access-log}} which looks like this:
     158
     159   127.0.0.1 [Sun Nov 16 15:16:01 2008] "GET http://localhost:8080/foo HTTP/1.1" Links (2.2; NetBSD 5.99.01 macppc; x)
    136160
    137161=== Runtime information
     
    228252{{headers}} procedure.
    229253
     254<procedure>(write-logged-response)</procedure>
     255
     256This procedure simply writes {{current-response}} after calling
     257{{handle-access-logging}}. Responses should always go through this
     258procedure instead of directly using {{write-response}} from intarweb.
     259
     260<procedure>(log-to log format . rest)</procedure>
     261
     262Write a printf-style format string to the specified log (one of
     263{{access-log}}, {{error-log}} or {{debug-log}}). {{format}} is a
     264{{printf}}-style format string, and rest arguments should match
     265the arguments one would pass to printf. A newline is appended to
     266the end of the log message automatically.
     267
    230268<procedure>(send-status code reason [message])</procedure>
    231269
     
    339377interpret their file arguments to be relative to this directory.
    340378
    341 <parameter>(exit-handler [handler])</parameter>
    342 
    343 During execution of an ssp page, {{exit-handler}} is bound to a
     379<parameter>(ssp-exit-handler [handler])</parameter>
     380
     381During execution of an ssp page, {{ssp-exit-handler}} is bound to a
    344382procedure that will finish the current page, ignoring any further
    345383content or code.
Note: See TracChangeset for help on using the changeset viewer.