[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[minion-cvs] Add milliseconds to log
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv19246/lib/mixminion
Modified Files:
Common.py
Log Message:
Add milliseconds to log
Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- Common.py 9 Jan 2003 06:28:58 -0000 1.50
+++ Common.py 9 Jan 2003 17:42:11 -0000 1.51
@@ -294,7 +294,10 @@
def _logtime():
'Helper function. Returns current local time formatted for log.'
- return time.strftime("%b %d %H:%M:%S", time.localtime(time.time()))
+ t = time.time()
+ return "%s.%03d"%(time.strftime("%b %d %H:%M:%S", time.localtime(t)),
+ # ???? There is probably a faster way to do this.
+ (t*1000)%1000)
class _FileLogHandler:
"""Helper class for logging. Represents a file on disk, and allows the