diff --git a/httpd-core.scm b/httpd-core.scm index d71f5b7..ee459e5 100644 --- a/httpd-core.scm +++ b/httpd-core.scm @@ -49,8 +49,13 @@ (set! server/admin s)) + (define *http-log?* #t) -(define *http-log-port* (current-error-port)) +(define *http-log-port* #f) + +(define (init-http-log!) + (set! *http-log-port* (current-error-port))) + (define (http-log fmt . args) (if *http-log?* (begin @@ -69,6 +74,7 @@ (define (httpd path-handler . args) (let-optionals args ((port 80) (root-dir "/usr/local/etc/httpd")) + (init-http-log!) (with-cwd root-dir (bind-listen-accept-loop protocol-family/internet