Code

open server logfile unbuffered
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 13 Jan 2003 02:44:42 +0000 (02:44 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 13 Jan 2003 02:44:42 +0000 (02:44 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1443 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
roundup/scripts/roundup_server.py

index d36285075ccd565ea0f28b9e693215a5cdb2ba4b..9ed580def604edd721b4514e93d53a711acf64a4 100644 (file)
@@ -14,6 +14,7 @@ are given with the most recent entry first.
 2003-??-?? 0.5.5
 - fixed rdbms searching by ID (sf bug 666615)
 - detect corrupted index and raise semi-useful exception (sf bug 666767)
+- open server logfile unbuffered
 
 
 2003-01-10 0.5.4
index fe118423484b6f096d0dd1841ff10d8c7d1599fa..9f3a26a2c0248e587aa8aec165ebb25717086c57 100644 (file)
@@ -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 @@ def run():
 
     # 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()