[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r6013 - trunk/gnue-common/src/apps
From: |
reinhard |
Subject: |
r6013 - trunk/gnue-common/src/apps |
Date: |
Wed, 21 Jul 2004 12:52:52 -0500 (CDT) |
Author: reinhard
Date: 2004-07-21 12:52:51 -0500 (Wed, 21 Jul 2004)
New Revision: 6013
Modified:
trunk/gnue-common/src/apps/GDebug.py
Log:
Add time to debug output.
Modified: trunk/gnue-common/src/apps/GDebug.py
===================================================================
--- trunk/gnue-common/src/apps/GDebug.py 2004-07-21 15:17:19 UTC (rev
6012)
+++ trunk/gnue-common/src/apps/GDebug.py 2004-07-21 17:52:51 UTC (rev
6013)
@@ -31,6 +31,7 @@
import string
import sys
+import time
from traceback import *
import __builtin__
@@ -39,6 +40,8 @@
_DEBUG_LEVEL = 0
_DEBUGGER = None
+__starttime = time.time ()
+
class _stderrcatcher:
def write(self, str):
global _fh, _conttest
@@ -114,9 +117,14 @@
except:
file = ""
+ s = time.time () - __starttime
+ (m, s) = divmod (s, 60)
+ (h, m) = divmod (m, 60)
+ datetime = "%d:%02d:%06.3f" % (h, m, s)
+
lines = string.split("%s" % message, '\n')
for line in lines:
- _fh.write("DB%03d: %s%s\n" % (level, file, line))
+ _fh.write("DB%03d: %s %s%s\n" % (level, datetime, file, line))
if dropToDebugger and _DEBUGGER:
_DEBUGGER.set_trace()
@@ -134,15 +142,3 @@
Exception.__init__(self)
self.level = level
self.message = message
-
-
-
-
-
-
-
-
-
-
-
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r6013 - trunk/gnue-common/src/apps,
reinhard <=