add timestamp
This commit is contained in:
parent
52f1c221c3
commit
a386ef8d0d
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user