List known limitations of with-logging-to-port.

This commit is contained in:
Vincent St-Amour 2011-06-01 15:20:36 -04:00
parent f24f451fd9
commit fe161a780c

View File

@ -2,6 +2,15 @@
(require racket/contract) (require racket/contract)
;; Known limitations:
;; - If another thread is logging while t is running, these messages will be
;; sent to the port as well, even if they don't come from proc.
;; - In the following example:
;; (with-logging-to-port port level
;; (lambda () (log-warning "ok") 3))
;; (log-warning "not ok")
;; If the logging on the last line is executed before the thread listening
;; to the logs sees the stop message, "not ok" will also be sent to port.
(define (with-logging-to-port port level proc) (define (with-logging-to-port port level proc)
(let* ([logger (make-logger #f (current-logger))] (let* ([logger (make-logger #f (current-logger))]
[receiver (make-log-receiver logger level)] [receiver (make-log-receiver logger level)]