Skip to content

Commit b81f54f

Browse files
author
Richard Jones
committed
open server logfile unbuffered
1 parent b79ea45 commit b81f54f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ are given with the most recent entry first.
1414
2003-??-?? 0.5.5
1515
- fixed rdbms searching by ID (sf bug 666615)
1616
- detect corrupted index and raise semi-useful exception (sf bug 666767)
17+
- open server logfile unbuffered
1718

1819

1920
2003-01-10 0.5.4

roundup/scripts/roundup_server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
""" HTTP Server that serves roundup.
1818
19-
$Id: roundup_server.py,v 1.16 2002-11-28 06:55:57 richard Exp $
19+
$Id: roundup_server.py,v 1.17 2003-01-13 02:44:42 richard Exp $
2020
"""
2121

2222
# python version check
@@ -305,7 +305,8 @@ def run():
305305

306306
# redirect stdout/stderr to our logfile
307307
if logfile:
308-
sys.stdout = sys.stderr = open(logfile, 'a')
308+
# appending, unbuffered
309+
sys.stdout = sys.stderr = open(logfile, 'a', 0)
309310

310311
httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler)
311312
print _('Roundup server started on %(address)s')%locals()

0 commit comments

Comments
 (0)