From cebdadf54d6c2fe6d4f9053634787c202ee79cff Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 9 May 2017 23:27:13 +0200 Subject: [PATCH] improve debug --- src/fenrir/core/settingsManager.py | 4 ++-- src/fenrir/speechDriver/genericDriver.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index 1afdd246..7ade5141 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -204,10 +204,10 @@ class settingsManager(): os.path.dirname(os.path.realpath(__main__.__file__)) + "/" + driverType + '/' + driverName + '.py') self.env['runtime'][driverType] = driver_mod.driver() self.env['runtime'][driverType].initialize(self.env) - self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType +" OK",debug.debugLevel.INFO, onAnyLevel=True) + self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") OK",debug.debugLevel.INFO, onAnyLevel=True) except Exception as e: self.env['runtime'][driverType] = None - self.env['runtime']['debug'].writeDebugOut("Loading " + driverType + " Driver : "+ str(e), debug.debugLevel.ERROR) + self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") FAILED:"+ str(e), debug.debugLevel.ERROR) def shutdownDriver(self, driverType): if self.env['runtime'][driverType] == None: return diff --git a/src/fenrir/speechDriver/genericDriver.py b/src/fenrir/speechDriver/genericDriver.py index c521637f..0a0912fd 100644 --- a/src/fenrir/speechDriver/genericDriver.py +++ b/src/fenrir/speechDriver/genericDriver.py @@ -80,11 +80,11 @@ class driver(): try: self.proc.terminate() except Exception as e: - self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.terminate():' + str(e),debug.debugLevel.ERROR) + self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.terminate():' + str(e),debug.debugLevel.WARNING) try: self.proc.kill() except Exception as e: - self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.kill():' + str(e),debug.debugLevel.ERROR) + self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.kill():' + str(e),debug.debugLevel.WARNING) self.proc = None self.lock.release() def setCallback(self, callback):