chickadee » debug » debug/syslog

(debug/syslog expressions) → unspecifiedsyntax

Debug to syslog.

expressions
The expressions to debug (cf. `debug' supra)
(define-syntax
  debug/syslog
  (ir-macro-transformer
    (lambda (expression rename inject)
      `(let ((port (make-syslog-port)))
         (with-error-output-to-port
           port
           (lambda ()
             (when (debug?)
                   (debug ,@(cdr expression))
                   (flush-output port))))))))