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:
@@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user