From 2b31d8e713de705fdca1c412d4748077f85e4009 Mon Sep 17 00:00:00 2001 From: Paul Ingram Date: Thu, 12 Sep 2013 18:19:04 -0700 Subject: vlog: Report timestamps in millisecond resolution in log messages. To make debugging easier. Signed-off-by: Ben Pfaff Signed-off-by: Paul Ingram --- python/ovs/vlog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/ovs') diff --git a/python/ovs/vlog.py b/python/ovs/vlog.py index 25ae4ea3b..14679d9cb 100644 --- a/python/ovs/vlog.py +++ b/python/ovs/vlog.py @@ -60,7 +60,8 @@ class Vlog: if not Vlog.__inited: return - now = datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ") + dt = datetime.datetime.utcnow(); + now = dt.strftime("%Y-%m-%dT%H:%M:%S.%%iZ") % (dt.microsecond/1000) syslog_message = ("%s|%s|%s|%s" % (Vlog.__msg_num, self.name, level, message)) -- cgit v1.2.1