logging.scm 397 B

1234567891011121314151617
  1. (define-module (logging)
  2. #:export (debug))
  3. (define displayln
  4. (lambda* (#:key (output-port (current-output-port)) (verbose #t) . msgs)
  5. (when verbose
  6. (display (string-append
  7. (string-join
  8. (map (lambda (msg) (simple-format #f "~a" msg)) msgs)
  9. " ") "\n")
  10. output-port))))
  11. ;; alias for displayln
  12. (define debug displayln)