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] [general]
debugLevel=0 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 debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log debugFile=
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True respectPunctuationPause=True

View File

@ -151,10 +151,10 @@ doubleTapTimeout=0.2
[general] [general]
debugLevel=0 debugLevel=0
# debugMode sets where the debug output should send to: # 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=Print just prints on the screen
debugMode=File debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log debugFile=
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True respectPunctuationPause=True

View File

@ -151,10 +151,10 @@ doubleTapTimeout=0.2
[general] [general]
debugLevel=0 debugLevel=0
# debugMode sets where the debug output should send to: # 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=Print just prints on the screen
debugMode=File debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log debugFile=
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True respectPunctuationPause=True

View File

@ -152,10 +152,10 @@ doubleTapTimeout=0.2
[general] [general]
debugLevel=0 debugLevel=0
# debugMode sets where the debug output should send to: # 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=Print just prints on the screen
debugMode=File debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log debugFile=
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True respectPunctuationPause=True

View File

@ -152,10 +152,10 @@ doubleTapTimeout=0.2
[general] [general]
debugLevel=0 debugLevel=0
# debugMode sets where the debug output should send to: # 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=Print just prints on the screen
debugMode=File debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log debugFile=
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True respectPunctuationPause=True

View File

@ -98,12 +98,12 @@ interruptOnKeyPressFilter=
doubleTapTimeout=0.2 doubleTapTimeout=0.2
[general] [general]
debugLevel=1 debugLevel=0
# debugMode sets where the debug output should send to: # 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=Print just prints on the screen
debugMode=File debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log debugFile=
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True respectPunctuationPause=True

View File

@ -151,10 +151,10 @@ doubleTapTimeout=0.2
[general] [general]
debugLevel=0 debugLevel=0
# debugMode sets where the debug output should send to: # 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=Print just prints on the screen
debugMode=File debugMode=File
debugFile=/var/log/fenrirscreenreader/fenrir.log debugFile=
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True respectPunctuationPause=True

View File

@ -6,9 +6,11 @@ from datetime import datetime
import pathlib, os import pathlib, os
class debugManager(): class debugManager():
def __init__(self, fileName = '/var/log/fenrirscreenreader/fenrir.log'): def __init__(self, fileName = ''):
self._file = None self._file = None
self._fileOpened = False self._fileOpened = False
self._fileName = '/tmp/fenrir_' + str(os.getpid()) + '_' + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')) + '.log'
if fileName != '':
self._fileName = fileName self._fileName = fileName
def initialize(self, environment): def initialize(self, environment):
self.env = environment self.env = environment

View File

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

View File

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