Megatest

Diff
Login

Differences From Artifact [9ac4a598ab]:

To Artifact [7793eb36cc]:


47
48
49
50
51
52
53


54
55


56
57
58
59
60
61
62
63





64
65
66
67
68
69
47
48
49
50
51
52
53
54
55


56
57
58
59
60
61
62



63
64
65
66
67
68
69
70
71
72
73







+
+
-
-
+
+





-
-
-
+
+
+
+
+






				    (conc *verbosity*))))))
  

(define (debug:print n . params)
  (if (debug:debug-mode n)
      (with-output-to-port (current-error-port)
	(lambda ()
	  (if *logging*
	      (db:log-event (apply conc params))
	  (apply print params)
	  (if *logging* (apply db:log-event params))))))
	      (apply print params)
	      )))))

(define (debug:print-info n . params)
  (if (debug:debug-mode n)
      (with-output-to-port (current-error-port)
	(lambda ()
	  (let ((res #f));; (format#format #f "INFO:~2d ~a" n (apply conc params))))
	    (apply print "INFO: (" n ") " params) ;; res)
	    (if *logging* (db:log-event res)))))))
	  (let ((res (format#format #f "INFO: (~2d) ~a" n (apply conc params))))
	    (if *logging*
		(db:log-event res)
		(apply print "INFO: (" n ") " params) ;; res)
		))))))

;; if a value is printable (i.e. string or number) return the value
;; else return an empty string
(define-inline (printable val)
  (if (or (number? val)(string? val)) val ""))