On this page:
start-recording
stop-recording
6.3.90.900

15 Logging

NOTE: This library is deprecated; use racket/logging, instead. The contents of this module, with the exceptions below, have been merged with racket/logging.

 (require unstable/logging) package: unstable-lib

procedure

(start-recording log-spec ...)  listener?

  log-spec : (or/c 'fatal 'error 'warning 'info 'debug symbol? #f)

procedure

(stop-recording listener)

  
(listof (vector/c (or/c 'fatal 'error 'warning 'info 'debug)
                  string?
                  any/c
                  (or/c symbol? #f)))
  listener : listener?
start-recording starts recording log messages matching the given log-spec (see make-log-receiver for how log-spec is interpreted). 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.

Examples:
(define l (start-recording 'warning))
> (log-warning "1")
> (log-warning "2")
> (stop-recording l)

'(#(warning "1" #<continuation-mark-set> #f)

  #(warning "2" #<continuation-mark-set> #f))