diff roundup/scripts/roundup_server.py @ 1367:b0d342a3548f

open server logfile unbuffered
author Richard Jones <richard@users.sourceforge.net>
date Mon, 13 Jan 2003 02:44:42 +0000
parents 7c9fda4a6692
children 8dc60d87ab42
line wrap: on
line diff
--- a/roundup/scripts/roundup_server.py	Sun Jan 12 23:53:20 2003 +0000
+++ b/roundup/scripts/roundup_server.py	Mon Jan 13 02:44:42 2003 +0000
@@ -16,7 +16,7 @@
 # 
 """ HTTP Server that serves roundup.
 
-$Id: roundup_server.py,v 1.16 2002-11-28 06:55:57 richard Exp $
+$Id: roundup_server.py,v 1.17 2003-01-13 02:44:42 richard Exp $
 """
 
 # python version check
@@ -305,7 +305,8 @@
 
     # redirect stdout/stderr to our logfile
     if logfile:
-        sys.stdout = sys.stderr = open(logfile, 'a')
+        # appending, unbuffered
+        sys.stdout = sys.stderr = open(logfile, 'a', 0)
 
     httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler)
     print _('Roundup server started on %(address)s')%locals()

Roundup Issue Tracker: http://roundup-tracker.org/