tweak planet logging so the "PLaneT: " prefix is more consistently there

This commit is contained in:
Robby Findler 2011-08-12 08:19:34 -05:00
parent b300bae75c
commit 1553658369

View File

@ -494,10 +494,11 @@ Various common pieces of code that both the client and server need to access
(define planet-log (define planet-log
(let ([planet-logger (make-logger 'PLaneT (current-logger))]) (let ([planet-logger (make-logger 'PLaneT (current-logger))])
(λ (str . fmt) (λ (str . fmt)
(define formatted-str (apply format str fmt))
(parameterize ([current-logger planet-logger]) (parameterize ([current-logger planet-logger])
(log-info (apply format str fmt)) (log-info formatted-str)
(when (planet-logging-to-stdout) (when (planet-logging-to-stdout)
(apply fprintf (current-output-port) str fmt) (fprintf (current-output-port) "PLaneT: ~a" formatted-str)
(newline (current-output-port))))))) (newline (current-output-port)))))))
;; note that this function assumes that 'f' prints line-by-line ;; note that this function assumes that 'f' prints line-by-line