2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

vlog: Report timestamps in millisecond resolution in log messages.

To make debugging easier.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Paul Ingram <pingram@nicira.com>
This commit is contained in:
Paul Ingram
2013-09-12 18:19:04 -07:00
committed by Ben Pfaff
parent 63a04c1b5f
commit 2b31d8e713
13 changed files with 98 additions and 29 deletions

View File

@@ -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))