diff --git a/config/settings/espeak.settings.conf b/config/settings/espeak.settings.conf index ccc7deff..37d42ac9 100644 --- a/config/settings/espeak.settings.conf +++ b/config/settings/espeak.settings.conf @@ -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 diff --git a/config/settings/settings-daemon.conf b/config/settings/settings-daemon.conf index 219c9f7f..85321301 100644 --- a/config/settings/settings-daemon.conf +++ b/config/settings/settings-daemon.conf @@ -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 diff --git a/config/settings/settings-pty.conf b/config/settings/settings-pty.conf index 219c9f7f..85321301 100644 --- a/config/settings/settings-pty.conf +++ b/config/settings/settings-pty.conf @@ -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 diff --git a/config/settings/settings.conf b/config/settings/settings.conf index 22645577..4f42b795 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -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 diff --git a/config/settings/settings.conf.example b/config/settings/settings.conf.example index da7665e3..ac58a765 100644 --- a/config/settings/settings.conf.example +++ b/config/settings/settings.conf.example @@ -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 diff --git a/config/settings/settings.conf.storm b/config/settings/settings.conf.storm index 9970ba8f..1b59cc58 100644 --- a/config/settings/settings.conf.storm +++ b/config/settings/settings.conf.storm @@ -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 diff --git a/config/settings/speech-dispatcher.settings.conf b/config/settings/speech-dispatcher.settings.conf index 01d890b7..664086ca 100644 --- a/config/settings/speech-dispatcher.settings.conf +++ b/config/settings/speech-dispatcher.settings.conf @@ -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 diff --git a/src/fenrirscreenreader/core/debugManager.py b/src/fenrirscreenreader/core/debugManager.py index 7e8d01db..874c1421 100644 --- a/src/fenrirscreenreader/core/debugManager.py +++ b/src/fenrirscreenreader/core/debugManager.py @@ -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 diff --git a/src/fenrirscreenreader/core/settingsData.py b/src/fenrirscreenreader/core/settingsData.py index 81f9e38d..5eceffe1 100644 --- a/src/fenrirscreenreader/core/settingsData.py +++ b/src/fenrirscreenreader/core/settingsData.py @@ -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, diff --git a/src/fenrirscreenreader/core/settingsManager.py b/src/fenrirscreenreader/core/settingsManager.py index a3e57848..988503eb 100644 --- a/src/fenrirscreenreader/core/settingsManager.py +++ b/src/fenrirscreenreader/core/settingsManager.py @@ -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')