improve debugging

This commit is contained in:
chrys 2016-10-19 22:29:06 +02:00
parent f76c3c0651
commit e3ce8c31f8
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ class debug():
if not self._fileOpened:
self.openDebugFile()
if onAnyLevel:
msg = 'INFO ' + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f'))
msg = 'ANY_LEVEL '+ str(level) + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f'))
else:
msg = str(level) +' ' + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')
)

View File

@ -64,7 +64,7 @@ class settingsManager():
shortcut.append(shortcutRepeat)
shortcut.append(sorted(shortcutKeys))
if len(shortcutKeys) != 1 and not 'KEY_FENRIR' in shortcutKeys:
self.env['runtime']['debug'].writeDebugOut("invalid shortcut (missing KEY_FENRIR): "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.ERROR, onAnyLevel=True)
self.env['runtime']['debug'].writeDebugOut("invalid shortcut (missing KEY_FENRIR): "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.ERROR)
continue
self.env['runtime']['debug'].writeDebugOut("Shortcut: "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.INFO, onAnyLevel=True)
self.env['bindings'][str(shortcut)] = commandName