Must call FLUSH-OUTPUT to make sure that logged requests are pushed
authorChris Hanson <org/chris-hanson/cph>
Tue, 2 Nov 2004 04:37:12 +0000 (04:37 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 2 Nov 2004 04:37:12 +0000 (04:37 +0000)
out in a reasonable amount of time.

v7/src/ssp/mod-lisp.scm

index eba70086a415ce896017648cb7a5de4e2da15a12..4cc210b19ea4fd49567a5b0e2db9c6827fc6d8e4 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: mod-lisp.scm,v 1.9 2004/11/01 04:56:51 cph Exp $
+$Id: mod-lisp.scm,v 1.10 2004/11/02 04:37:12 cph Exp $
 
 Copyright 2003,2004 Massachusetts Institute of Technology
 
@@ -774,11 +774,13 @@ USA.
 
 (define (log-requests request)
   (if request-log-port
-      (write-line (list (get-universal-time)
-                       (http-message-method request)
-                       (http-message-url request)
-                       (http-message-user-name request)
-                       (http-message-post-parameters request))
-                 request-log-port)))
+      (begin
+       (write-line (list (get-universal-time)
+                         (http-message-method request)
+                         (http-message-url request)
+                         (http-message-user-name request)
+                         (http-message-post-parameters request))
+                   request-log-port)
+       (flush-output request-log-port))))
 
 (define request-log-port #f)
\ No newline at end of file