Properly set up logging port.
This commit is contained in:
parent
0cbe13d177
commit
5e1193c60a
|
@ -49,8 +49,13 @@
|
||||||
(set! server/admin s))
|
(set! server/admin s))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(define *http-log?* #t)
|
(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)
|
(define (http-log fmt . args)
|
||||||
(if *http-log?*
|
(if *http-log?*
|
||||||
(begin
|
(begin
|
||||||
|
@ -69,6 +74,7 @@
|
||||||
(define (httpd path-handler . args)
|
(define (httpd path-handler . args)
|
||||||
(let-optionals args ((port 80)
|
(let-optionals args ((port 80)
|
||||||
(root-dir "/usr/local/etc/httpd"))
|
(root-dir "/usr/local/etc/httpd"))
|
||||||
|
(init-http-log!)
|
||||||
(with-cwd root-dir
|
(with-cwd root-dir
|
||||||
(bind-listen-accept-loop protocol-family/internet
|
(bind-listen-accept-loop protocol-family/internet
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue