From a5f57a440c74f1babf7b17eeb20e614dc14cdf5c Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 27 Feb 2014 15:56:42 -0800 Subject: [PATCH] Revert "add threshold to message" This reverts commit 17439c2bb653448f3f3314bf50a16137877a0bd7. --- command.rkt | 6 +++--- debug.rkt | 8 ++------ world.rkt | 4 ---- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/command.rkt b/command.rkt index 7696fee..640319f 100644 --- a/command.rkt +++ b/command.rkt @@ -16,7 +16,7 @@ (current-directory))) (define-for-syntax (command-error error-string) - `(displayln (string-append "Pollen error: ", error-string))) + `(displayln (string-append "Error: ", error-string))) (define-syntax (just-a-hook-for-the-macro stx) (if arg-command-name @@ -31,9 +31,9 @@ (parameterize ([world:current-project-root ,arg-project-directory]) (start-server))))] [else (if (regexp-match #rx"(shit|fuck)" arg-command-name) - `(displayln ,(let ([responses '("Cursing at free software? Really?" "How uncouth." "Same to you, buddy.")]) + (displayln (let ([responses '("Cursing at free software? Really?" "How uncouth." "Same to you, buddy.")]) (list-ref responses (random (length responses))))) - (command-error (format "unknown command '~a'" arg-command-name)))])) + (command-error (format "unknown command ~a" arg-command-name)))])) #'(begin))) (just-a-hook-for-the-macro) diff --git a/debug.rkt b/debug.rkt index c5733c9..7d1520c 100644 --- a/debug.rkt +++ b/debug.rkt @@ -1,6 +1,6 @@ #lang racket/base (require racket/date racket/string) -(require sugar/debug sugar/define "world.rkt") +(require sugar/debug sugar/define) (provide (all-from-out sugar/debug)) @@ -61,11 +61,7 @@ (displayln (string-join `(,@(map (λ(x)(if (string? x) x (format "~v" x))) items))) (current-error-port))) (define+provide (message . items) - (apply message-threshold world:threshold-normal items)) - -(define+provide (message-threshold threshold . items) - (when (threshold . <= . (world:current-message-threshold)) - (displayln (string-join `(,(make-debug-timestamp) ,@(map (λ(x)(if (string? x) x (format "~v" x))) items))) (current-error-port)))) + (displayln (string-join `(,(make-debug-timestamp) ,@(map (λ(x)(if (string? x) x (format "~v" x))) items))) (current-error-port))) (define (exn+stack->string exn) (string-append diff --git a/world.rkt b/world.rkt index 6ba131d..7dacfaf 100644 --- a/world.rkt +++ b/world.rkt @@ -57,8 +57,4 @@ (define current-module-root (make-parameter #f)) (define current-server-extras-path (make-parameter #f)) -(define threshold-silent 0) -(define threshold-normal 10) -(define threshold-debug 100) -(define current-message-threshold (make-parameter threshold-debug))