From daba37e8fffe1e9f4b7661ba51f1f91dd469ea06 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 1 Jun 2011 15:20:36 -0400 Subject: [PATCH] List known limitations of with-logging-to-port. original commit: fe161a780cb58970cd7ea707aa498e4a1e36fef3 --- collects/unstable/logging.rkt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/collects/unstable/logging.rkt b/collects/unstable/logging.rkt index afe353e3..f5747f1a 100644 --- a/collects/unstable/logging.rkt +++ b/collects/unstable/logging.rkt @@ -2,6 +2,15 @@ (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) (let* ([logger (make-logger #f (current-logger))] [receiver (make-log-receiver logger level)]