{"size": 1291, "ext": "scrbl", "max_stars_repo_path": "unstable-doc/scribblings/logging.scrbl", "max_stars_repo_name": "racket/unstable", "max_stars_repo_stars_event_min_datetime": "2018-08-24T22:01:32.000Z", "max_stars_repo_stars_event_max_datetime": "2018-08-24T22:01:32.000Z", "max_issues_repo_path": "unstable-doc/scribblings/logging.scrbl", "max_issues_repo_name": "racket/unstable", "max_issues_repo_issues_event_min_datetime": "2020-06-25T14:58:07.000Z", "max_issues_repo_issues_event_max_datetime": "2020-06-25T19:01:25.000Z", "max_forks_repo_path": "unstable-doc/scribblings/logging.scrbl", "max_forks_repo_name": "racket/unstable", "max_forks_repo_forks_event_min_datetime": "2015-01-20T15:40:24.000Z", "max_forks_repo_forks_event_max_datetime": "2018-08-24T22:01:34.000Z"}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": 4, "avg_line_length": 30.7380952381, "max_line_length": 81, "alphanum_fraction": 0.6707978311}
#lang scribble/manual
@(require scribble/eval "utils.rkt" (for-label racket unstable/logging))

@(define the-eval (make-base-eval))
@(the-eval '(require unstable/logging))

@title{Logging}

@deprecated[@racketmodname[racket/logging]]{
The contents of this module, with the exceptions below, have been merged with
@racketmodname[racket/logging].
}

@defmodule[unstable/logging]

@deftogether[[
  @defproc[(start-recording
            [log-spec (or/c 'fatal 'error 'warning 'info 'debug symbol? #f)] ...)
           listener?]
  @defproc[(stop-recording [listener listener?])
           (listof (vector/c (or/c 'fatal 'error 'warning 'info 'debug)
                             string?
                             any/c
                             (or/c symbol? #f)))]]]{

@racket[start-recording] starts recording log messages matching the given
@racket[log-spec] (see @racket[make-log-receiver] for how @racket[log-spec] is
interpreted). Messages will be recorded until stopped by passing the returned
listener object to @racket[stop-recording]. @racket[stop-recording] will then
return a list of the log messages that have been reported.

@defexamples[
#:eval the-eval
(define l (start-recording 'warning))
(log-warning "1")
(log-warning "2")
(stop-recording l)
]}


@close-eval[the-eval]
