Version: 5.2
21 Logging
This module provides tools for logging.
Runs proc, outputting any logging of level level or higher to
port. Returns whatever proc returns.
|
|
proc : (-> any) |
level : (or/c 'fatal 'error 'warning 'info 'debug) = 'debug |
Runs
proc, calling
interceptor on any log message of level
level or higher.
interceptor receives the entire log vectors
(see
Receiving Logged Events)
as arguments. Returns whatever
proc returns.
A lower-level interface to logging is also available.
(start-recording [#:level level]) → listener? | level : (or/c 'fatal 'error 'warning 'info 'debug) = 'debug |
|
|
start-recording starts recording log messages of the desired level or
higher. Messages will be recorded until stopped by passing the returned
listener object to
stop-recording.
stop-recording will then
return a list of the log messages that have been reported.