add timestamp

This commit is contained in:
Chrys 2019-09-07 00:43:23 +02:00
parent 52f1c221c3
commit a386ef8d0d
10 changed files with 24 additions and 20 deletions

View File

@ -148,8 +148,11 @@ doubleTapTimeout=0.2
[general]
debugLevel=0
# debugMode sets where the debug output should send to:
# debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen
debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log
debugFile=
punctuationProfile=default
punctuationLevel=some
respectPunctuationPause=True

View File

@ -151,10 +151,10 @@ doubleTapTimeout=0.2
[general]
debugLevel=0
# debugMode sets where the debug output should send to:
# debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log)
# debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen
debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log
debugFile=
punctuationProfile=default
punctuationLevel=some
respectPunctuationPause=True

View File

@ -151,10 +151,10 @@ doubleTapTimeout=0.2
[general]
debugLevel=0
# debugMode sets where the debug output should send to:
# debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log)
# debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen
debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log
debugFile=
punctuationProfile=default
punctuationLevel=some
respectPunctuationPause=True

View File

@ -152,10 +152,10 @@ doubleTapTimeout=0.2
[general]
debugLevel=0
# debugMode sets where the debug output should send to:
# debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log)
# debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen
debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log
debugFile=
punctuationProfile=default
punctuationLevel=some
respectPunctuationPause=True

View File

@ -152,10 +152,10 @@ doubleTapTimeout=0.2
[general]
debugLevel=0
# debugMode sets where the debug output should send to:
# debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log)
# debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen
debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log
debugFile=
punctuationProfile=default
punctuationLevel=some
respectPunctuationPause=True

View File

@ -98,12 +98,12 @@ interruptOnKeyPressFilter=
doubleTapTimeout=0.2
[general]
debugLevel=1
debugLevel=0
# debugMode sets where the debug output should send to:
# debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log)
# debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen
debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log
debugFile=
punctuationProfile=default
punctuationLevel=some
respectPunctuationPause=True

View File

@ -151,10 +151,10 @@ doubleTapTimeout=0.2
[general]
debugLevel=0
# debugMode sets where the debug output should send to:
# debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log)
# debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen
debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log
debugFile=
punctuationProfile=default
punctuationLevel=some
respectPunctuationPause=True

View File

@ -6,12 +6,14 @@ from datetime import datetime
import pathlib, os
class debugManager():
def __init__(self, fileName = '/var/log/fenrirscreenreader/fenrir.log'):
def __init__(self, fileName = ''):
self._file = None
self._fileOpened = False
self._fileName = fileName
self._fileName = '/tmp/fenrir_' + str(os.getpid()) + '_' + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')) + '.log'
if fileName != '':
self._fileName = fileName
def initialize(self, environment):
self.env = environment
self.env = environment
def shutdown(self):
self.closeDebugFile()
def __del__(self):
@ -27,7 +29,7 @@ class debugManager():
if self._fileName != '':
directory = os.path.dirname(self._fileName)
if not os.path.exists(directory):
pathlib.Path(directory).mkdir(parents=True, exist_ok=True)
pathlib.Path(directory).mkdir(parents=True, exist_ok=True)
try:
self._file = open(self._fileName,'a')
self._fileOpened = True

View File

@ -56,7 +56,7 @@ settingsData = {
'general':{
'debugLevel': debug.debugLevel.DEACTIVE,
'debugMode': 'FILE',
'debugFile': '/var/log/fenrirscreenreader/fenrir.log',
'debugFile': '',
'punctuationProfile':'default',
'punctuationLevel': 'some',
'respectPunctuationPause':True,

View File

@ -308,7 +308,6 @@ class settingsManager():
# TODO needs cleanup use dict
#self.setOptionArgDict('keyboard', 'keyboardLayout', 'pty')
self.setSetting('keyboard', 'keyboardLayout', 'pty')
self.setSetting('general', 'debugFile', '/tmp/fenrir-pty.log')
if cliArgs.emulated_evdev:
self.setSetting('screen', 'driver', 'ptyDriver')
self.setSetting('keyboard', 'driver', 'evdevDriver')