added millisecond to the time output
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 20 May 2008 19:46:16 +0000 (19:46 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 20 May 2008 19:46:16 +0000 (19:46 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1335 9efc2488-bf62-4759-914b-345cdb29e865

src/python/osrf/log.py

index b3d57d0..ad2f0af 100644 (file)
@@ -148,7 +148,9 @@ def __log_file(msg):
 
     global LOG_TYPE
 
-    timestamp = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
+    epoch = time.time()
+    timestamp = time.strftime('%Y-%M-%d %H:%m:%S', time.localtime(epoch))
+    timestamp += '.%s' % str('%0.3f' % epoch)[-3:] # grab the millis
 
     logfile = None
     try: