From 8ecf43ebab77c387c166d4f452e821662942260e Mon Sep 17 00:00:00 2001 From: chrys87 Date: Thu, 15 Sep 2016 12:55:52 +0200 Subject: [PATCH] Update debug.py --- src/fenrir-package/utils/debug.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fenrir-package/utils/debug.py b/src/fenrir-package/utils/debug.py index c62c16cf..94e33fbb 100644 --- a/src/fenrir-package/utils/debug.py +++ b/src/fenrir-package/utils/debug.py @@ -2,7 +2,7 @@ # Debugger module for the Fenrir screen reader. from enum import Enum -import time +from datetime import datetime class debugLevel(Enum): DEACTIVE = 0 @@ -42,7 +42,8 @@ class debug(): else: if not self._fileOpened: self.openDebugFile() - self._file.write(str(level) +': ' + str(time.time()) + ' ' + text + '\n') + self._file.write(str(level) +' ' + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f') +) + ': ' + text + '\n') def closeDebugFile(self): if not self._fileOpened: