From ff1827892128b6803fdd97c11ba27a87048c6fcd Mon Sep 17 00:00:00 2001 From: chrys87 Date: Thu, 15 Sep 2016 12:03:55 +0200 Subject: [PATCH] Update debug.py --- src/fenrir-package/utils/debug.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fenrir-package/utils/debug.py b/src/fenrir-package/utils/debug.py index fbc9a214..c62c16cf 100644 --- a/src/fenrir-package/utils/debug.py +++ b/src/fenrir-package/utils/debug.py @@ -2,6 +2,7 @@ # Debugger module for the Fenrir screen reader. from enum import Enum +import time class debugLevel(Enum): DEACTIVE = 0 @@ -10,6 +11,8 @@ class debugLevel(Enum): INFO = 3 def __int__(self): return self.value + def __str__(self): + return self.name class debug(): def __init__(self, fileName='/var/log/fenrir.log'): @@ -39,7 +42,7 @@ class debug(): else: if not self._fileOpened: self.openDebugFile() - self._file.write(text + '\n') + self._file.write(str(level) +': ' + str(time.time()) + ' ' + text + '\n') def closeDebugFile(self): if not self._fileOpened: