Properly set up logging port.
This commit is contained in:
		
							parent
							
								
									0cbe13d177
								
							
						
					
					
						commit
						5e1193c60a
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
				       
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue