[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7224 - trunk/gnue-common/src/apps
From: |
jcater |
Subject: |
[gnue] r7224 - trunk/gnue-common/src/apps |
Date: |
Fri, 18 Mar 2005 11:13:14 -0600 (CST) |
Author: jcater
Date: 2005-03-18 11:13:13 -0600 (Fri, 18 Mar 2005)
New Revision: 7224
Modified:
trunk/gnue-common/src/apps/GDebug.py
Log:
flush the debug-file immediately after writing, so log files are always current
Modified: trunk/gnue-common/src/apps/GDebug.py
===================================================================
--- trunk/gnue-common/src/apps/GDebug.py 2005-03-17 22:41:27 UTC (rev
7223)
+++ trunk/gnue-common/src/apps/GDebug.py 2005-03-18 17:13:13 UTC (rev
7224)
@@ -73,6 +73,7 @@
del (lines [-1])
self.filehandle.write (string.join (["DB000: " + s for s in lines], "\n"))
self.filehandle.write ("\n")
+ self.filehandle.flush ()
def writelines (self, list):
for line in list:
@@ -146,7 +147,7 @@
"""
global _fh, _DEBUGGER
-
+
s = time.time () - __starttime
(m, s) = divmod (s, 60)
(h, m) = divmod (m, 60)
@@ -155,6 +156,7 @@
lines = "%s" % message
for line in lines.splitlines ():
_fh.write ("DB%03d: %s %s%s%s" % (level, stamp, filename, line,
os.linesep))
+ _fh.flush ()
if dropToDebugger and _DEBUGGER:
_DEBUGGER.set_trace ()
@@ -338,9 +340,9 @@
levels+=range(int(values[0]),int(values[1])+1)
else:
levels+=[int(entry)]
-
+
_DEBUG_LEVELS=levels
-
+
# If debug levels are given, we must replace the empty placeholder functions
# with a function that actually does something
if _DEBUG_LEVELS != []:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7224 - trunk/gnue-common/src/apps,
jcater <=