summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/process.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-06-23 11:43:38 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-07-03 10:39:56 +0000
commit0d8deec6ae56c451aeb01712b8b61e95d12ebf35 (patch)
tree191c30f438b98c7acc95155f260c75d6ec0561ab /src/osmo_gsm_tester/process.py
parent58ff38d456e21071789abad83fb1ed2656dce3a0 (diff)
Add microsecond accuracy to log timestamps
This is useful while debugging and trying to check events across other outputs such as pcap files, process logs, etc. Change-Id: I43bb5c6e9977189251802bc2b078c52eb046bab8
Diffstat (limited to 'src/osmo_gsm_tester/process.py')
-rw-r--r--src/osmo_gsm_tester/process.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py
index d24bf3d..4b68ef5 100644
--- a/src/osmo_gsm_tester/process.py
+++ b/src/osmo_gsm_tester/process.py
@@ -21,6 +21,7 @@ import os
import time
import subprocess
import signal
+from datetime import datetime
from . import log, test, event_loop
from .util import Dir
@@ -55,7 +56,7 @@ class Process(log.Origin):
path = self.run_dir.new_child(name)
f = open(path, 'w')
self.dbg(path)
- f.write('(launched: %s)\n' % time.strftime(log.LONG_DATEFMT))
+ f.write('(launched: %s)\n' % datetime.now().strftime(log.LONG_DATEFMT))
f.flush()
self.outputs[name] = (path, f)
return f